From c12adf0b7653fe6b5e88aead8b8007aeb53c3931 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 24 Mar 2015 15:33:21 -0400 Subject: [PATCH] Backed out changeset b78aa57b284e (bug 1146565) for test_blocklistchange.js xpcshell failures. CLOSED TREE --- .../extensions/internal/GMPProvider.jsm | 32 +++++-------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/toolkit/mozapps/extensions/internal/GMPProvider.jsm b/toolkit/mozapps/extensions/internal/GMPProvider.jsm index 1a5956ccfcab..4d3982f32e8c 100644 --- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm +++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm @@ -338,7 +338,14 @@ GMPWrapper.prototype = { AddonManagerPrivate.callAddonListeners("onPropertyChanged", this, ["appDisabled"]); if (this.appDisabled) { - this.uninstallPlugin(); + AddonManagerPrivate.callAddonListeners("onUninstalling", this, false); + if (this._gmpPath) { + this._log.info("onPrefEMEGlobalEnabledChanged() - unregistering gmp " + + "directory " + this._gmpPath); + gmpService.removeAndDeletePluginDirectory(this._gmpPath); + } + GMPPrefs.reset(GMPPrefs.KEY_PLUGIN_VERSION, this.id); + AddonManagerPrivate.callAddonListeners("onUninstalled", this); } else { AddonManagerPrivate.callInstallListeners("onExternalInstall", null, this, null, false); @@ -398,17 +405,6 @@ GMPWrapper.prototype = { AddonManagerPrivate.callAddonListeners("onInstalled", this); }, - uninstallPlugin: function() { - AddonManagerPrivate.callAddonListeners("onUninstalling", this, false); - if (this.gmpPath) { - this._log.info("uninstallPlugin() - unregistering gmp directory " + - this.gmpPath); - gmpService.removeAndDeletePluginDirectory(this.gmpPath); - } - GMPPrefs.reset(GMPPrefs.KEY_PLUGIN_VERSION, this.id); - AddonManagerPrivate.callAddonListeners("onUninstalled", this); - }, - shutdown: function() { Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_ENABLED, this._plugin.id), @@ -435,7 +431,6 @@ let GMPProvider = { "GMPProvider."); let telemetry = {}; this.buildPluginList(); - this.ensureProperCDMInstallState(); Preferences.observe(GMPPrefs.KEY_LOG_BASE, configureLogging); @@ -568,17 +563,6 @@ let GMPProvider = { this._plugins.set(plugin.id, plugin); } }, - - ensureProperCDMInstallState: function() { - if (!GMPPrefs.get(GMPPrefs.KEY_EME_ENABLED, true)) { - for (let [id, plugin] of this._plugins) { - if (plugin.isEME && plugin.wrapper.isInstalled) { - gmpService.addPluginDirectory(plugin.wrapper.gmpPath); - plugin.wrapper.uninstallPlugin(); - } - } - } - }, }; AddonManagerPrivate.registerProvider(GMPProvider, [