Bug 1294615. Part 1 - Assert mQueuedSeek.Exists() is false in InitiateSeek(). r=kaku

InitiateSeek() is called from several places where we can prove mQueuedSeek.Exists() is false:
1. MaybeFinishDecodeFirstFrame(): mQueuedSeek is moved when calling InitiateSeek().
2. Seek() rejects mQueuedSeek before calling InitiateSeek().
3. StartDecoding(): mQueuedSeek is moved when calling InitiateSeek().
4. VisibilityChanged(): it doesn't call InitiateSeek() when mQueuedSeek.Exists() is true.

MozReview-Commit-ID: BriPw0VID5O

--HG--
extra : rebase_source : 1417b108eab1cf9cf332e55e77077d7947505d27
This commit is contained in:
JW Wang 2016-08-11 16:07:45 +08:00
Родитель 6ef71a1b08
Коммит 7e467b7cda
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -1614,6 +1614,7 @@ MediaDecoderStateMachine::InitiateSeek(SeekJob aSeekJob)
&MediaDecoderStateMachine::OnSeekTaskResolved,
&MediaDecoderStateMachine::OnSeekTaskRejected));
MOZ_ASSERT(!mQueuedSeek.Exists());
MOZ_ASSERT(!mCurrentSeek.Exists());
mCurrentSeek = Move(aSeekJob);
return mCurrentSeek.mPromise.Ensure(__func__);