Bug 1289976. Part 3 - Remove the IsShutdown() check from MediaDecoder::FireTimeUpdate(). r=kaku
authorJW Wang <jwwang@mozilla.com>
Wed, 27 Jul 2016 10:36:09 +0800
changeset 333323 af2250994011d1934ebc92a6e9f92c21a1262a5d
parent 333322 5e333fc275673c681e91631b1e8443f9fa8fd268
child 333324 37e8b902997510d0bc08a4a91ed55cde0426a33e
push id10033
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:50:26 +0000
treeherdermozilla-aurora@5dddbefdf759 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1289976
milestone51.0a1
Bug 1289976. Part 3 - Remove the IsShutdown() check from MediaDecoder::FireTimeUpdate(). r=kaku FireTimeUpdate() is only called from UpdateLogicalPositionInternal() which returns early when IsShutdown() is true. MozReview-Commit-ID: 4GZwrI85aXj
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1672,19 +1672,17 @@ MediaDecoder::GetStateMachine() const {
   MOZ_ASSERT(NS_IsMainThread());
   return mDecoderStateMachine;
 }
 
 void
 MediaDecoder::FireTimeUpdate()
 {
   MOZ_ASSERT(NS_IsMainThread());
-  if (IsShutdown()) {
-    return;
-  }
+  MOZ_ASSERT(!IsShutdown());
   mOwner->FireTimeUpdate(true);
 }
 
 void
 MediaDecoder::PinForSeek()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MediaResource* resource = GetResource();