Bug 1332146 - use stronger assertions in MediaDecoder.h r=kaku
authorJW Wang <jwwang@mozilla.com>
Thu, 19 Jan 2017 10:42:29 +0800
changeset 375014 cb11189cd2d2da8608a45c1dc3c876c2c259a29e
parent 375013 3544f347daf2af7a48e9f8b4a8ff75181d948041
child 375015 77dc13c9bb350d1f9ee4b16f50cf3c3bb3dabebb
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1332146
milestone53.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 1332146 - use stronger assertions in MediaDecoder.h r=kaku MozReview-Commit-ID: 60umMQWhead
dom/media/MediaDecoder.h
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -397,17 +397,17 @@ private:
 
   // Seeking has started. Inform the element on the main thread.
   void SeekingStarted();
 
   void UpdateLogicalPositionInternal();
   void UpdateLogicalPosition()
   {
     MOZ_ASSERT(NS_IsMainThread());
-    MOZ_ASSERT(!IsShutdown());
+    MOZ_DIAGNOSTIC_ASSERT(!IsShutdown());
     // Per spec, offical position remains stable during pause and seek.
     if (mPlayState == PLAY_STATE_PAUSED || IsSeeking()) {
       return;
     }
     UpdateLogicalPositionInternal();
   }
 
   // Find the end of the cached data starting at the current decoder
@@ -459,17 +459,17 @@ private:
   virtual void NotifyDecodedFrames(const FrameStatisticsData& aStats) override
   {
     GetFrameStatistics().NotifyDecodedFrames(aStats);
   }
 
   void UpdateReadyState()
   {
     MOZ_ASSERT(NS_IsMainThread());
-    MOZ_ASSERT(!IsShutdown());
+    MOZ_DIAGNOSTIC_ASSERT(!IsShutdown());
     mOwner->UpdateReadyState();
   }
 
   virtual MediaDecoderOwner::NextFrameStatus NextFrameStatus() { return mNextFrameStatus; }
   virtual MediaDecoderOwner::NextFrameStatus NextFrameBufferedStatus();
 
   // Returns a string describing the state of the media player internal
   // data. Used for debugging purposes.
@@ -498,17 +498,17 @@ protected:
 
   // Used by the ogg decoder to watch mStateMachineIsShutdown.
   virtual void ShutdownBitChanged() {}
 
   double ExplicitDuration() { return mExplicitDuration.Ref().ref(); }
 
   void SetExplicitDuration(double aValue)
   {
-    MOZ_ASSERT(!IsShutdown());
+    MOZ_DIAGNOSTIC_ASSERT(!IsShutdown());
     mExplicitDuration.Set(Some(aValue));
 
     // We Invoke DurationChanged explicitly, rather than using a watcher, so
     // that it takes effect immediately, rather than at the end of the current task.
     DurationChanged();
   }
 
   /******