Bug 1292449. Part 3 - Assert IsShutdown() is false in MediaDecoder::Shutdown(). Shutdown() should be only called once. r=kaku
authorJW Wang <jwwang@mozilla.com>
Mon, 01 Aug 2016 16:11:20 +0800
changeset 308531 e47457d354ec288f0fd54d2b44602d0e3c28bce3
parent 308530 a62419846b2f5e386115cc4bf78e6d2066e278bc
child 308532 513d42e7a166bab34785c7f727704bf8d32c1a36
push id31133
push userjwwang@mozilla.com
push dateMon, 08 Aug 2016 03:37:28 +0000
treeherderautoland@e47457d354ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1292449
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1292449. Part 3 - Assert IsShutdown() is false in MediaDecoder::Shutdown(). Shutdown() should be only called once. r=kaku MozReview-Commit-ID: 6iFKkTTb7qD
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -611,20 +611,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__);