Bug 1289976. Part 8 - Remove the IsShutdown() check from UpdateReadyState(). The callback is disconnected by the watch manager in Shutdown(). r?kaku draft
authorJW Wang <jwwang@mozilla.com>
Wed, 27 Jul 2016 10:59:23 +0800
changeset 394664 037c4523217cb7131867e5b8a83d36f16b2f5f39
parent 394663 048c9276f7a27fb51fa6e526842e29080bbee5c7
child 394665 2305d9a1f51ebfd450f744ab41588e9c73644a0a
push id24619
push userjwwang@mozilla.com
push dateSat, 30 Jul 2016 10:57:17 +0000
reviewerskaku
bugs1289976
milestone50.0a1
Bug 1289976. Part 8 - Remove the IsShutdown() check from UpdateReadyState(). The callback is disconnected by the watch manager in Shutdown(). r?kaku MozReview-Commit-ID: xVSWdj1Q0y
dom/media/MediaDecoder.h
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -488,19 +488,18 @@ private:
                                    uint32_t aDropped) override
   {
     GetFrameStatistics().NotifyDecodedFrames(aParsed, aDecoded, aDropped);
   }
 
   void UpdateReadyState()
   {
     MOZ_ASSERT(NS_IsMainThread());
-    if (!IsShutdown()) {
-      mOwner->UpdateReadyState();
-    }
+    MOZ_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.
   virtual void GetMozDebugReaderData(nsAString& aString) {}