Bug 1289976. Part 10 - Remove the IsShutdown() check from MediaDecoder::UpdateDormantState(). r=kaku

1. It is called from DormantTimerExpired(). The timer is canceled in Shutdown().
2. It is called from NotifyOwnerActivityChanged() which happens before Shutdown().
3. It is called from Play() which happens before Shutdown().
4. It is called from Seek() which happens before Shutdown().

MozReview-Commit-ID: EnKHF61FBXf

--HG--
extra : rebase_source : 04df59b6722c8340e5163a00eb916442799cfcf1
This commit is contained in:
JW Wang 2016-07-27 10:56:46 +08:00
Родитель 62af9d2687
Коммит 1e61811c7e
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -319,9 +319,9 @@ void
MediaDecoder::UpdateDormantState(bool aDormantTimeout, bool aActivity)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(!IsShutdown());
if (IsShutdown() ||
!mDecoderStateMachine ||
if (!mDecoderStateMachine ||
!mOwner->GetVideoFrameContainer() ||
(mOwner->GetMediaElement() && mOwner->GetMediaElement()->IsBeingDestroyed()) ||
!mDormantSupported)