Bug 1278228 - use MOZ_DIAGNOSTIC_ASSERT() to confirm that AccurateVideoOnly seek might reach MDSM::InitiateSeek(); r?jwwang
MozReview-Commit-ID: LLZn65yZib5
--- 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());