Bug 1289976. Part 5 - Remove the IsShutdown() check from MediaDecoder::Pause(). r?kaku
1. Pause() is called from HTMLMediaElement and happens before Shutdown().
2. Pause() is called from SetPlaybackRate() which is called from HTMLMediaElement.
MozReview-Commit-ID: DDr7Bg8jkF2
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -416,19 +416,17 @@ MediaDecoder::CancelDormantTimer()
mDormantTimer->Cancel();
}
}
void
MediaDecoder::Pause()
{
MOZ_ASSERT(NS_IsMainThread());
- if (IsShutdown()) {
- return;
- }
+ MOZ_ASSERT(!IsShutdown());
if (mPlayState == PLAY_STATE_LOADING || IsEnded()) {
mNextState = PLAY_STATE_PAUSED;
return;
}
ChangeState(PLAY_STATE_PAUSED);
}
void