Bug 1531286 - Temporarily make an error a strong assertion to determine the root cause of various crashes. r=padenot
authorJean-Yves Avenard <jyavenard@mozilla.com>
Thu, 28 Feb 2019 11:18:18 +0000
changeset 519595 3f3479815becd6e2625472b3d3ac4d7c5a89727f
parent 519594 a5c49f8dc2a0db9badab2f432f3b2e487634a399
child 519596 d5f2a2a21c1599d35bffbadae8c9a52f9abc25b7
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1531286
milestone67.0a1
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
Bug 1531286 - Temporarily make an error a strong assertion to determine the root cause of various crashes. r=padenot Differential Revision: https://phabricator.services.mozilla.com/D21513
dom/media/MediaData.cpp
--- a/dom/media/MediaData.cpp
+++ b/dom/media/MediaData.cpp
@@ -62,24 +62,25 @@ bool AudioData::AdjustForStartTime(int64
   mOriginalTime -= startTimeOffset;
   if (mTrimWindow) {
     *mTrimWindow -= startTimeOffset;
   }
   return MediaData::AdjustForStartTime(aStartTime);
 }
 
 bool AudioData::SetTrimWindow(const media::TimeInterval& aTrim) {
+  MOZ_DIAGNOSTIC_ASSERT(aTrim.mStart.IsValid() && aTrim.mEnd.IsValid(),
+                        "An overflow occurred on the provided TimeInterval");
   if (!mAudioData) {
     // MoveableData got called. Can no longer work on it.
     return false;
   }
   const size_t originalFrames = mAudioData.Length() / mChannels;
   const TimeUnit originalDuration = FramesToTimeUnit(originalFrames, mRate);
-  if (!aTrim.mStart.IsValid() || !aTrim.mEnd.IsValid() ||
-      aTrim.mStart < mOriginalTime ||
+  if (aTrim.mStart < mOriginalTime ||
       aTrim.mEnd > mOriginalTime + originalDuration) {
     return false;
   }
 
   auto trimBefore = TimeUnitToFrames(aTrim.mStart - mOriginalTime, mRate);
   auto trimAfter = aTrim.mEnd == GetEndTime()
                        ? originalFrames
                        : TimeUnitToFrames(aTrim.mEnd - mOriginalTime, mRate);