Backed out changeset 6ecaea77b9d5 (bug 1540746) for causing multiple build bustages on CheckedInt.h CLOSED TREE
authorarthur.iakab <aiakab@mozilla.com>
Tue, 16 Apr 2019 20:39:10 +0300
changeset 469719 50efd1672ffb
parent 469718 6ecaea77b9d5
child 469720 140dfb5fd701
push id35879
push usernerli@mozilla.com
push dateTue, 16 Apr 2019 22:01:48 +0000
treeherdermozilla-central@12a60898fdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1540746
milestone68.0a1
backs out6ecaea77b9d5
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 6ecaea77b9d5 (bug 1540746) for causing multiple build bustages on CheckedInt.h CLOSED TREE
dom/media/VideoUtils.cpp
dom/media/mediasink/AudioSink.cpp
--- a/dom/media/VideoUtils.cpp
+++ b/dom/media/VideoUtils.cpp
@@ -61,17 +61,17 @@ TimeUnit FramesToTimeUnit(int64_t aFrame
 // Converts from microseconds to number of audio frames, given the specified
 // audio rate.
 CheckedInt64 UsecsToFrames(int64_t aUsecs, uint32_t aRate) {
   return SaferMultDiv(aUsecs, aRate, USECS_PER_S);
 }
 
 // Format TimeUnit as number of frames at given rate.
 CheckedInt64 TimeUnitToFrames(const TimeUnit& aTime, uint32_t aRate) {
-  return aTime.IsValid() ? UsecsToFrames(aTime.ToMicroseconds(), aRate) : aTime;
+  return UsecsToFrames(aTime.ToMicroseconds(), aRate);
 }
 
 nsresult SecondsToUsecs(double aSeconds, int64_t& aOutUsecs) {
   if (aSeconds * double(USECS_PER_S) > INT64_MAX) {
     return NS_ERROR_FAILURE;
   }
   aOutUsecs = int64_t(aSeconds * double(USECS_PER_S));
   return NS_OK;
--- a/dom/media/mediasink/AudioSink.cpp
+++ b/dom/media/mediasink/AudioSink.cpp
@@ -380,17 +380,17 @@ void AudioSink::NotifyAudioNeeded() {
     // Calculate the timestamp of the next chunk of audio in numbers of
     // samples.
     CheckedInt64 sampleTime =
         TimeUnitToFrames(data->mTime - mStartTime, data->mRate);
     // Calculate the number of frames that have been pushed onto the audio
     // hardware.
     CheckedInt64 missingFrames = sampleTime - mFramesParsed;
 
-    if (!missingFrames.isValid() || !sampleTime.isValid()) {
+    if (!missingFrames.isValid()) {
       NS_WARNING("Int overflow in AudioSink");
       mErrored = true;
       return;
     }
 
     if (missingFrames.value() > AUDIO_FUZZ_FRAMES) {
       // The next audio packet begins some time after the end of the last packet
       // we pushed to the audio hardware. We must push silence into the audio