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
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -314,19 +314,19 @@ MediaDecoder::IsHeuristicDormantSupporte
#endif
mIsHeuristicDormantSupported;
}
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)
{
return;
}
DECODER_LOG("UpdateDormantState aTimeout=%d aActivity=%d mIsDormant=%d "