Bug 1319706. Part 4 - add some logs to debug 'ended' not fired. r=kaku
authorJW Wang <jwwang@mozilla.com>
Thu, 24 Nov 2016 14:58:50 +0800
changeset 324620 e355836470f90868b9bba2d15e2acc10f8b6ff4b
parent 324619 3dc995228de419ee09061b826f21e0ad547abc97
child 324621 e9ff40069326e4c5d5e72bc58e65bef0778ac67a
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewerskaku
bugs1319706
milestone53.0a1
Bug 1319706. Part 4 - add some logs to debug 'ended' not fired. r=kaku MozReview-Commit-ID: ATqszBBdo1P
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -980,19 +980,24 @@ MediaDecoder::IsShutdown() const
 
 void
 MediaDecoder::PlaybackEnded()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_DIAGNOSTIC_ASSERT(!IsShutdown());
 
   if (mLogicallySeeking || mPlayState == PLAY_STATE_LOADING) {
+    DECODER_LOG("MediaDecoder::PlaybackEnded bailed out, "
+                "mLogicallySeeking=%d mPlayState=%s",
+                mLogicallySeeking.Ref(), ToPlayStateStr(mPlayState));
     return;
   }
 
+  DECODER_LOG("MediaDecoder::PlaybackEnded");
+
   ChangeState(PLAY_STATE_ENDED);
   InvalidateWithFlags(VideoFrameContainer::INVALIDATE_FORCE);
   mOwner->PlaybackEnded();
 
   // This must be called after |mOwner->PlaybackEnded()| call above, in order
   // to fire the required durationchange.
   if (IsInfinite()) {
     SetInfinite(false);