Bug 1289976. Part 3 - Remove the IsShutdown() check from MediaDecoder::FireTimeUpdate(). r?kaku draft
authorJW Wang <jwwang@mozilla.com>
Wed, 27 Jul 2016 10:36:09 +0800
changeset 394659 9645b3b441a28292fd2858359fec304ac1376848
parent 394658 24fc99374a5e5e3b0003dcf2a1b24495b43f33b5
child 394660 987839a737ce38c0de4a416115ac2883dc3470f1
push id24619
push userjwwang@mozilla.com
push dateSat, 30 Jul 2016 10:57:17 +0000
reviewerskaku
bugs1289976
milestone50.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
@@ -1670,19 +1670,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();