Backed out changeset 3b0d1e17cad0 (bug 1055408) for bustage
authorNigel Babu <nigelbabu@gmail.com>
Tue, 19 Aug 2014 12:06:42 +0530
changeset 200264 4dc129c1aef4b4ddf457eb77d21abced8fcafa87
parent 200263 c50473a8b795ea1fe46054181ec93248cd83a8b0
child 200265 1db9d4b9d7407a5f5f4a7a75c39732be6470e4ce
push id8272
push useremorley@mozilla.com
push dateTue, 19 Aug 2014 14:17:45 +0000
treeherderfx-team@a955e211bfde [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1055408
milestone34.0a1
backs out3b0d1e17cad0bf702407bde9e8da5cb74075904d
Backed out changeset 3b0d1e17cad0 (bug 1055408) for bustage
content/media/gmp/GMPParent.cpp
--- a/content/media/gmp/GMPParent.cpp
+++ b/content/media/gmp/GMPParent.cpp
@@ -156,22 +156,16 @@ GMPParent::CloseIfUnused()
 
   if ((mDeleteProcessOnlyOnUnload ||
        mState == GMPStateLoaded ||
        mState == GMPStateUnloading) &&
       mVideoDecoders.IsEmpty() &&
       mVideoEncoders.IsEmpty() &&
       mDecryptors.IsEmpty() &&
       mAudioDecoders.IsEmpty()) {
-
-    // Ensure all timers are killed.
-    for (uint32_t i = mTimers.Length(); i > 0; i--) {
-      mTimers[i - 1]->Shutdown();
-    }
-
     if (mAsyncShutdownRequired) {
       if (!mAsyncShutdownInProgress) {
         LOGD(("%s::%s: %p sending async shutdown notification", __CLASS__,
               __FUNCTION__, this));
         mAsyncShutdownInProgress = true;
         if (!SendBeginAsyncShutdown()) {
           AbortAsyncShutdown();
         }
@@ -235,18 +229,19 @@ GMPParent::CloseActive(bool aDieWhenUnlo
   for (uint32_t i = mDecryptors.Length(); i > 0; i--) {
     mDecryptors[i - 1]->Shutdown();
   }
 
   for (uint32_t i = mAudioDecoders.Length(); i > 0; i--) {
     mAudioDecoders[i - 1]->Shutdown();
   }
 
-  // Note: we don't shutdown timers here, we do that in CloseIfUnused(),
-  // as there are multiple entry points to CloseIfUnused().
+  for (uint32_t i = mTimers.Length(); i > 0; i--) {
+    mTimers[i - 1]->Shutdown();
+  }
 
   // Note: We don't shutdown storage API objects here, as they need to
   // work during async shutdown of GMPs.
 
   // Note: the shutdown of the codecs is async!  don't kill
   // the plugin-container until they're all safely shut down via
   // CloseIfUnused();
   CloseIfUnused();