Bug 1309761 - Some tweaks to MediaDecoder::DumpDebugInfo(). r=bechen
authorJW Wang <jwwang@mozilla.com>
Tue, 11 Oct 2016 16:58:09 +0800
changeset 317817 ca60c8afc501dce9bbe9c46490d0578a7068daeb
parent 317816 b0fa542d80b7ed60e146d139ed2e4a062af3e809
child 317818 8eeb7978e14300b421157187afeeb9d985e9af89
push id33158
push userjwwang@mozilla.com
push dateFri, 14 Oct 2016 02:44:27 +0000
treeherderautoland@ca60c8afc501 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbechen
bugs1309761
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1309761 - Some tweaks to MediaDecoder::DumpDebugInfo(). r=bechen MozReview-Commit-ID: 9e7sImUs2vz
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1890,24 +1890,26 @@ MediaDecoder::NextFrameBufferedStatus()
     : 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",
+           "state: mPlayState=%s mIsDormant=%d, mdsm=%p",
            mInfo ? mInfo->mAudio.mChannels : 0, mInfo ? mInfo->mAudio.mRate : 0,
            mInfo ? mInfo->HasAudio() : 0, mInfo ? mInfo->HasVideo() : 0,
-           PlayStateStr(), mIsDormant);
+           PlayStateStr(), mIsDormant, GetStateMachine());
 
   nsString str;
   GetMozDebugReaderData(str);
-  DUMP_LOG("reader data:\n%s", NS_ConvertUTF16toUTF8(str).get());
+  if (!str.IsEmpty()) {
+    DUMP_LOG("reader data:\n%s", NS_ConvertUTF16toUTF8(str).get());
+  }
 
   if (GetStateMachine()) {
     GetStateMachine()->DumpDebugInfo();
   }
 }
 
 void
 MediaDecoder::NotifyAudibleStateChanged()