Bug 736542 - Bug 727637 causes about:newaddon to not show up with magically appearing XPI's (backout c4e3ec142aa8). r=dtownsend
authorBlair McBride <bmcbride@mozilla.com>
Wed, 21 Mar 2012 17:12:37 +1300
changeset 89915 d23d714bc491c473e69b33000cbddadbe37a12e9
parent 89914 40e83506f87ba01bdd819f6d4313483b1fc68414
child 89916 5673f647d33aaf40955765adea03227ac96e6fc6
push id22298
push usermak77@bonardo.net
push dateWed, 21 Mar 2012 22:49:36 +0000
treeherdermozilla-central@652a5c8a24b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdtownsend
bugs736542, 727637
milestone14.0a1
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
Bug 736542 - Bug 727637 causes about:newaddon to not show up with magically appearing XPI's (backout c4e3ec142aa8). r=dtownsend
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -424,30 +424,28 @@ BrowserGlue.prototype = {
 
     // If there are plugins installed that are outdated, and the user hasn't
     // been warned about them yet, open the plugins update page.
     if (Services.prefs.getBoolPref(PREF_PLUGINS_NOTIFYUSER))
       this._showPluginUpdatePage();
 
     // For any add-ons that were installed disabled and can be enabled offer
     // them to the user
+    var win = this.getMostRecentBrowserWindow();
+    var browser = win.gBrowser;
     var changedIDs = AddonManager.getStartupChanges(AddonManager.STARTUP_CHANGE_INSTALLED);
-    if (changedIDs.length > 0) {
-      AddonManager.getAddonsByIDs(changedIDs, function(aAddons) {
-        var win = this.getMostRecentBrowserWindow();
-        var browser = win.gBrowser;
-        aAddons.forEach(function(aAddon) {
-          // If the add-on isn't user disabled or can't be enabled then skip it.
-          if (!aAddon.userDisabled || !(aAddon.permissions & AddonManager.PERM_CAN_ENABLE))
-            return;
+    AddonManager.getAddonsByIDs(changedIDs, function(aAddons) {
+      aAddons.forEach(function(aAddon) {
+        // If the add-on isn't user disabled or can't be enabled then skip it
+        if (!aAddon.userDisabled || !(aAddon.permissions & AddonManager.PERM_CAN_ENABLE))
+          return;
 
-          browser.selectedTab = browser.addTab("about:newaddon?id=" + aAddon.id);
-        })
-      });
-    }
+        browser.selectedTab = browser.addTab("about:newaddon?id=" + aAddon.id);
+      })
+    });
 
     let keywordURLUserSet = Services.prefs.prefHasUserValue("keyword.URL");
     Services.telemetry.getHistogramById("FX_KEYWORD_URL_USERSET").add(keywordURLUserSet);
 
     // Perform default browser checking.
     var shell;
     try {
       shell = Components.classes["@mozilla.org/browser/shell-service;1"]