Backed out changeset 3b0d1e17cad0 (
bug 1055408) for bustage
--- 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();