Bug 1267936 - make a stronger assertion to catch that MediaDecoder is created when MediaShutdownManager::Shutdown() begins. r=jya.
MozReview-Commit-ID: 3uFx4IL1j2N
--- a/dom/media/MediaShutdownManager.cpp
+++ b/dom/media/MediaShutdownManager.cpp
@@ -44,17 +44,17 @@ MediaShutdownManager::Instance()
sInstance = new MediaShutdownManager();
}
return *sInstance;
}
void
MediaShutdownManager::EnsureCorrectShutdownObserverState()
{
- MOZ_ASSERT(!mIsDoingXPCOMShutDown);
+ MOZ_DIAGNOSTIC_ASSERT(!mIsDoingXPCOMShutDown);
bool needShutdownObserver = mDecoders.Count() > 0;
if (needShutdownObserver != mIsObservingShutdown) {
mIsObservingShutdown = needShutdownObserver;
if (mIsObservingShutdown) {
nsContentUtils::RegisterShutdownObserver(this);
} else {
nsContentUtils::UnregisterShutdownObserver(this);
// Clear our singleton reference. This will probably delete