Backing out changeset 8ea6126d6d2e
authorDave Townsend <dtownsend@oxymoronical.com>
Tue, 23 Mar 2010 18:31:52 -0700
changeset 39785 584c6ffa8895c5dd8996234ea108de838b19af87
parent 39784 8aec62049ba28c1d24f3f648c132b35593971a21
child 39786 46c1526501572dfc65f9ac0b5f3931ca6e1f766e
push id67
push userdtownsend@mozilla.com
push dateWed, 24 Mar 2010 02:18:05 +0000
milestone1.9.3a4pre
Backing out changeset 8ea6126d6d2e
toolkit/components/search/nsSearchService.js
toolkit/mozapps/extensions/LightweightThemeManager.jsm
toolkit/mozapps/extensions/XPIProvider.jsm
toolkit/mozapps/extensions/test/xpcshell/head_addons.js
toolkit/mozapps/extensions/test/xpcshell/test_install.js
toolkit/mozapps/extensions/test/xpcshell/test_theme.js
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -2237,17 +2237,17 @@ Engine.prototype = {
       notifyAction(this, SEARCH_ENGINE_CHANGED);
 
       let wrapper = new SearchAddon(this);
       if (value) {
         AddonManagerPrivate.callAddonListeners("onUninstalling", wrapper, false);
         AddonManagerPrivate.callAddonListeners("onUninstalled", wrapper);
       }
       else {
-        AddonManagerPrivate.callAddonListeners("onInstalling", wrapper, null, false);
+        AddonManagerPrivate.callAddonListeners("onInstalling", wrapper, false);
         AddonManagerPrivate.callAddonListeners("onInstalled", wrapper);
       }
     }
   },
 
   get iconURI() {
     return this._iconURI;
   },
@@ -2784,17 +2784,17 @@ SearchService.prototype = {
       if (this.__sortedEngines) {
         this.__sortedEngines.push(aEngine);
         this._needToSetOrderPrefs = true;
       }
       notifyAction(aEngine, SEARCH_ENGINE_ADDED);
     }
 
     let wrapper = new SearchAddon(this, aEngine);
-    AddonManagerPrivate.callAddonListeners("onInstalling", wrapper, null, false);
+    AddonManagerPrivate.callAddonListeners("onInstalling", wrapper, false);
     AddonManagerPrivate.callAddonListeners("onInstalled", wrapper);
 
     if (aEngine._hasUpdates) {
       // Schedule the engine's next update, if it isn't already.
       if (!engineMetadataService.getAttr(aEngine, "updateexpir"))
         engineUpdateService.scheduleNextUpdate(aEngine);
   
       // We need to save the engine's _dataType, if this is the first time the
--- a/toolkit/mozapps/extensions/LightweightThemeManager.jsm
+++ b/toolkit/mozapps/extensions/LightweightThemeManager.jsm
@@ -127,17 +127,17 @@ var LightweightThemeManager = {
     cancel.data = false;
     _observerService.notifyObservers(cancel, "lightweight-theme-change-requested",
                                      JSON.stringify(aData));
 
     if (aData) {
       let theme = this.getUsedTheme(aData.id);
       if (!theme) {
         var wrapper = new AddonWrapper(aData);
-        AddonManagerPrivate.callAddonListeners("onInstalling", wrapper, null, false);
+        AddonManagerPrivate.callAddonListeners("onInstalling", wrapper, false);
       }
       let current = this.currentTheme;
       if (!current || current.id != aData.id) {
         let usedThemes = _usedThemesExceptId(aData.id);
         if (current)
           usedThemes.splice(1, 0, aData);
         else
           usedThemes.unshift(aData);
--- a/toolkit/mozapps/extensions/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/XPIProvider.jsm
@@ -3340,17 +3340,16 @@ AddonInstall.prototype = {
     if (!requiresRestart && this.existingAddon) {
       requiresRestart = this.existingAddon.active &&
                         XPIProvider.disableRequiresRestart(this.existingAddon);
     }
 
     LOG("Starting install of " + this.sourceURL.spec);
     AddonManagerPrivate.callAddonListeners("onInstalling",
                                            createWrapper(this.addon),
-                                           this.wrapper,
                                            requiresRestart);
     let stageDir = this.installLocation.getStagingDir();
     try {
       // First stage the file regardless of whether restarting is necessary
       let stageFile = stageDir.clone();
       stageDir.append(this.addon.id);
       if (stageDir.exists())
         stageDir.remove(true);
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -339,22 +339,20 @@ var AddonListener = {
   },
 
   onDisabled: function(addon) {
     let [event, expectedRestart] = getExpectedEvent(addon.id);
     do_check_eq("onDisabled", event);
     do_check_false(hasFlag(addon.permissions, AddonManager.PERM_CANDISABLE));
   },
 
-  onInstalling: function(addon, install, requiresRestart) {
-    let [event, expectedRestart, expectedInstall] = getExpectedEvent(addon.id);
+  onInstalling: function(addon, requiresRestart) {
+    let [event, expectedRestart] = getExpectedEvent(addon.id);
     do_check_eq("onInstalling", event);
     do_check_eq(requiresRestart, expectedRestart);
-    if (expectedInstall !== undefined)
-      do_check_eq(install, expectedInstall);
     if (expectedRestart)
       do_check_true(hasFlag(addon.pendingOperations, AddonManager.PENDING_INSTALL));
   },
 
   onInstalled: function(addon) {
     let [event, expectedRestart] = getExpectedEvent(addon.id);
     do_check_eq("onInstalled", event);
   },
--- a/toolkit/mozapps/extensions/test/xpcshell/test_install.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_install.js
@@ -104,17 +104,17 @@ function run_test_1() {
         do_check_eq(installs.length, 0);
 
         AddonManager.getInstalls(["extension"], function(installs) {
           do_check_eq(installs.length, 1);
           do_check_eq(installs[0], install);
 
           prepare_test({
             "addon1@tests.mozilla.org": [
-              ["onInstalling", true, install]
+              "onInstalling"
             ]
           }, [
             "onInstallStarted",
             "onInstallEnded",
           ], check_test_1);
           install.install();
         });
       });
@@ -215,17 +215,17 @@ function check_test_2(install) {
   // Pause the install here and start it again in run_test_3
   do_execute_soon(function() { run_test_3(install) });
   return false
 }
 
 function run_test_3(install) {
   prepare_test({
     "addon2@tests.mozilla.org": [
-      ["onInstalling", true, install]
+      "onInstalling"
     ]
   }, [
     "onInstallStarted",
     "onInstallEnded",
   ], check_test_3);
   install.install();
 }
 
@@ -444,17 +444,17 @@ function run_test_8() {
     "onNewInstall"
   ]);
 
   AddonManager.getInstallForFile(do_get_addon("test_install4"), function(install) {
     do_check_true(install.addon.isCompatible);
 
     prepare_test({
       "addon3@tests.mozilla.org": [
-        ["onInstalling", true, install]
+        "onInstalling"
       ]
     }, [
       "onInstallStarted",
       "onInstallEnded",
     ], check_test_8);
     install.install();
   });
 }
--- a/toolkit/mozapps/extensions/test/xpcshell/test_theme.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_theme.js
@@ -200,17 +200,17 @@ function run_test_3() {
     }]
   }, dest);
   restartManager(1);
 
   AddonManager.addAddonListener(AddonListener);
 
   prepare_test({
     "1@personas.mozilla.org": [
-      ["onInstalling", false, null],
+      ["onInstalling", false],
       "onInstalled",
       ["onEnabling", false],
       "onEnabled"
     ],
     "{972ce4c6-7e08-4474-a285-3208198ce6fd}": [
       ["onDisabling", false],
       "onDisabled",
     ]
@@ -272,17 +272,17 @@ function run_test_3() {
 // Installing a second lightweight theme should disable the first with no restart
 function run_test_4() {
   prepare_test({
     "1@personas.mozilla.org": [
       ["onDisabling", false],
       "onDisabled",
     ],
     "2@personas.mozilla.org": [
-      ["onInstalling", false, null],
+      ["onInstalling", false],
       "onInstalled",
       ["onEnabling", false],
       "onEnabled"
     ]
   });
 
   LightweightThemeManager.currentTheme = {
     id: "2",