Bug 1267936 - make a stronger assertion to catch that MediaDecoder is created when MediaShutdownManager::Shutdown() begins. r=jya. draft
authorJW Wang <jwwang@mozilla.com>
Wed, 27 Apr 2016 15:20:47 +0800
changeset 357597 f127ded7a823dc20e9da9e5abee614eaab8ba9df
parent 356754 7b8247ca5fb41e3c37a11ba551db017205b087f8
child 519670 3015f4e8f2df85470e682a1fdedfb41ae9736593
push id16808
push userjwwang@mozilla.com
push dateFri, 29 Apr 2016 01:43:33 +0000
reviewersjya
bugs1267936
milestone49.0a1
Bug 1267936 - make a stronger assertion to catch that MediaDecoder is created when MediaShutdownManager::Shutdown() begins. r=jya. MozReview-Commit-ID: 3uFx4IL1j2N
dom/media/MediaShutdownManager.cpp
--- 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