Backed out changeset b78aa57b284e (bug 1146565) for test_blocklistchange.js xpcshell failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 24 Mar 2015 15:33:21 -0400
changeset 264275 79d8deba1d30fe9b8027a411dfd668a0c63d6ed1
parent 264274 6e463e53546badf11d118dd8081bec9a5b07d591
child 264276 068c46a5ad3fe4f601bec9a672dc58d2d0573ecb
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1146565
milestone39.0a1
backs outb78aa57b284e8a67bdaf6cf855eaa1b895c54d3d
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
Backed out changeset b78aa57b284e (bug 1146565) for test_blocklistchange.js xpcshell failures. CLOSED TREE
toolkit/mozapps/extensions/internal/GMPProvider.jsm
--- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
@@ -333,17 +333,24 @@ GMPWrapper.prototype = {
                                            "onEnabled" : "onDisabled",
                                            this);
   },
 
   onPrefEMEGlobalEnabledChanged: function() {
     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);
       AddonManagerPrivate.callAddonListeners("onInstalling", this, false);
       AddonManagerPrivate.callAddonListeners("onInstalled", this);
       if (!this._isUpdateCheckPending) {
         this._isUpdateCheckPending = true;
         GMPPrefs.reset(GMPPrefs.KEY_UPDATE_LAST_CHECK, null);
@@ -393,27 +400,16 @@ GMPWrapper.prototype = {
     if (this._gmpPath && this.isActive) {
       this._log.info("onPrefVersionChanged() - registering gmp directory " +
                      this._gmpPath);
       gmpService.addPluginDirectory(this._gmpPath);
     }
     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),
                        this.onPrefEnabledChanged, this);
     Preferences.ignore(GMPPrefs.getPrefKey(GMPPrefs.KEY_PLUGIN_VERSION,
                                            this._plugin.id),
                        this.onPrefVersionChanged, this);
     if (this._plugin.isEME) {
@@ -430,17 +426,16 @@ let GMPProvider = {
   _plugins: null,
 
   startup: function() {
     configureLogging();
     this._log = Log.repository.getLoggerWithMessagePrefix("Toolkit.GMP",
                                                           "GMPProvider.");
     let telemetry = {};
     this.buildPluginList();
-    this.ensureProperCDMInstallState();
 
     Preferences.observe(GMPPrefs.KEY_LOG_BASE, configureLogging);
 
     for (let [id, plugin] of this._plugins) {
       let wrapper = plugin.wrapper;
       let gmpPath = wrapper.gmpPath;
       let isEnabled = wrapper.isActive;
       this._log.trace("startup - enabled=" + isEnabled + ", gmpPath=" +
@@ -563,27 +558,16 @@ let GMPProvider = {
         wrapper: null,
         isEME: aPlugin.isEME,
       };
       plugin.fullDescription = this.generateFullDescription(aPlugin);
       plugin.wrapper = new GMPWrapper(plugin);
       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, [
   new AddonManagerPrivate.AddonType("plugin", URI_EXTENSION_STRINGS,
                                     STRING_TYPE_NAME,
                                     AddonManager.VIEW_TYPE_LIST, 6000,
                                     AddonManager.TYPE_SUPPORTS_ASK_TO_ACTIVATE)
 ]);