Bug 1629757 - Use switchToTabHavingURI to load about:addons. r=mstriemer
authorDão Gottwald <dao@mozilla.com>
Tue, 28 Apr 2020 17:54:07 +0000
changeset 526540 e7e1b495d96e81b5b410545abfea9c2dee52a968
parent 526539 050c45257373eb0ea2a18cfbfb3a17a5c821f62f
child 526541 c4a72c937045df517cbcb8e02307245bbbbe35b9
push id37358
push useropoprus@mozilla.com
push dateWed, 29 Apr 2020 03:05:14 +0000
treeherdermozilla-central@6bb8423186c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstriemer
bugs1629757
milestone77.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 1629757 - Use switchToTabHavingURI to load about:addons. r=mstriemer Differential Revision: https://phabricator.services.mozilla.com/D72138
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -7979,19 +7979,17 @@ function BrowserOpenAddonsMgr(aView) {
       browserWindow.gBrowser.selectedTab = tab;
       emWindow.focus();
       resolve(emWindow);
       return;
     }
 
     // This must be a new load, else the ping/pong would have
     // found the window above.
-    let whereToOpen =
-      window.gBrowser && gBrowser.selectedTab.isEmpty ? "current" : "tab";
-    openTrustedLinkIn("about:addons", whereToOpen);
+    switchToTabHavingURI("about:addons", true);
 
     Services.obs.addObserver(function observer(aSubject, aTopic, aData) {
       Services.obs.removeObserver(observer, aTopic);
       if (aView) {
         aSubject.loadView(aView);
       }
       aSubject.focus();
       resolve(aSubject);