Bug 1289976. Part 2 - Remove the IsShutdown() check from MediaDecoder::DumpDebugInfo() which happens before Shutdown(). r?kaku draft
authorJW Wang <jwwang@mozilla.com>
Wed, 27 Jul 2016 10:33:50 +0800
changeset 394658 24fc99374a5e5e3b0003dcf2a1b24495b43f33b5
parent 394657 7149ffffa4184e49745ff46a1a0923083dff76ef
child 394659 9645b3b441a28292fd2858359fec304ac1376848
push id24619
push userjwwang@mozilla.com
push dateSat, 30 Jul 2016 10:57:17 +0000
reviewerskaku
bugs1289976
milestone50.0a1
Bug 1289976. Part 2 - Remove the IsShutdown() check from MediaDecoder::DumpDebugInfo() which happens before Shutdown(). r?kaku MozReview-Commit-ID: HU3ybjFZMsE
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1935,27 +1935,28 @@ MediaDecoder::NextFrameBufferedStatus()
   return GetBuffered().Contains(interval)
     ? MediaDecoderOwner::NEXT_FRAME_AVAILABLE
     : MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE;
 }
 
 void
 MediaDecoder::DumpDebugInfo()
 {
+  MOZ_ASSERT(!IsShutdown());
   DUMP_LOG("metadata: channels=%u rate=%u hasAudio=%d hasVideo=%d, "
-           "state: mPlayState=%s mIsDormant=%d, IsShutdown()=%d",
+           "state: mPlayState=%s mIsDormant=%d",
            mInfo ? mInfo->mAudio.mChannels : 0, mInfo ? mInfo->mAudio.mRate : 0,
            mInfo ? mInfo->HasAudio() : 0, mInfo ? mInfo->HasVideo() : 0,
-           PlayStateStr(), mIsDormant, IsShutdown());
+           PlayStateStr(), mIsDormant);
 
   nsString str;
   GetMozDebugReaderData(str);
   DUMP_LOG("reader data:\n%s", NS_ConvertUTF16toUTF8(str).get());
 
-  if (!IsShutdown() && GetStateMachine()) {
+  if (GetStateMachine()) {
     GetStateMachine()->DumpDebugInfo();
   }
 }
 
 void
 MediaDecoder::NotifyAudibleStateChanged()
 {
   MOZ_ASSERT(!IsShutdown());