Bug 1278228 - use MOZ_DIAGNOSTIC_ASSERT() to confirm that AccurateVideoOnly seek might reach MDSM::InitiateSeek(); r?jwwang draft
authorKaku Kuo <tkuo@mozilla.com>
Tue, 07 Jun 2016 15:22:29 +0800
changeset 376034 db1e010b0d2eb1a3c6214de16507530ebc6e1379
parent 375957 1828937da9493b2cd54862b9c520b2ba5c7db92b
child 523055 ebaa85ab594441e61b2591baeb63696fc66c65a6
push id20475
push usertkuo@mozilla.com
push dateTue, 07 Jun 2016 07:35:15 +0000
reviewersjwwang
bugs1278228
milestone50.0a1
Bug 1278228 - use MOZ_DIAGNOSTIC_ASSERT() to confirm that AccurateVideoOnly seek might reach MDSM::InitiateSeek(); r?jwwang MozReview-Commit-ID: LLZn65yZib5
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1613,17 +1613,20 @@ MediaDecoderStateMachine::InitiateSeek(S
     mSeekTask = new AccurateSeekTask(mDecoderID, OwnerThread(),
                                      mReader.get(), Move(aSeekJob),
                                      mInfo, Duration(), GetMediaTime());
   } else if (aSeekJob.mTarget.IsNextFrame()) {
     mSeekTask = new NextFrameSeekTask(mDecoderID, OwnerThread(), mReader.get(),
                                       Move(aSeekJob), mInfo, Duration(),
                                       GetMediaTime(), AudioQueue(), VideoQueue());
   } else {
-    MOZ_ASSERT(false, "Cannot handle this seek task.");
+    // Use MOZ_DIAGNOSTIC_ASSERT here to test if a "VideoOnly" seek task could
+    // reach here, may come from a dormant state. Once we confirm it, we could
+    // than handle it.
+    MOZ_DIAGNOSTIC_ASSERT(false, "Cannot handle this seek task.");
   }
 
   // Stop playback now to ensure that while we're outside the monitor
   // dispatching SeekingStarted, playback doesn't advance and mess with
   // mCurrentPosition that we've setting to seekTime here.
   StopPlayback();
   UpdatePlaybackPositionInternal(mSeekTask->GetSeekJob().mTarget.GetTime().ToMicroseconds());