Bug 1290780. Part 8 - Assert IsShutdown() is false in SetExplicitDuration(). r?kaku draft
authorJW Wang <jwwang@mozilla.com>
Thu, 28 Jul 2016 16:54:53 +0800
changeset 395368 1ebdac42e80bc827f69056ebfd627643a85713b1
parent 395367 a20e7f37b7658f94cc983c4389a0172b4b5badfe
child 395369 3442c78bc832cbc02c229bc885d1631fbf21ef06
push id24759
push userjwwang@mozilla.com
push dateTue, 02 Aug 2016 03:40:59 +0000
reviewerskaku
bugs1290780
milestone50.0a1
Bug 1290780. Part 8 - Assert IsShutdown() is false in SetExplicitDuration(). r?kaku It is called from MediaSourceDecoder::SetMediaSourceDuration() which asserts !IsShutdown(). MozReview-Commit-ID: LF8rRPZhkA2
dom/media/MediaDecoder.h
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -539,16 +539,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());
     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();
   }
 
   /******