Bug 1292449. Part 3 - Assert IsShutdown() is false in MediaDecoder::Shutdown(). Shutdown() should be only called once.
MozReview-Commit-ID: 6iFKkTTb7qD
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -610,20 +610,17 @@ MediaDecoder::MediaDecoder(MediaDecoderO
MediaShutdownManager::Instance().Register(this);
}
void
MediaDecoder::Shutdown()
{
MOZ_ASSERT(NS_IsMainThread());
-
- if (IsShutdown()) {
- return;
- }
+ MOZ_ASSERT(!IsShutdown());
// Unwatch all watch targets to prevent further notifications.
mWatchManager.Shutdown();
mResourceCallback->Disconnect();
#ifdef MOZ_EME
mCDMProxyPromiseHolder.RejectIfExists(true, __func__);