Bug 1500136 - Use openTrustedLinkIn in gStoragePressureObserver. r=jaws
authorDão Gottwald <dao@mozilla.com>
Thu, 18 Oct 2018 17:19:32 +0000
changeset 490463 fbb784c460e5fdc034e1e734fe5d5cfcd3c18c33
parent 490462 295644de04d2b1abbccd102473cbf3023dfce21a
child 490464 33e352068e35a538ff380ef30749e53946c5bdd3
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersjaws
bugs1500136
milestone64.0a1
Bug 1500136 - Use openTrustedLinkIn in gStoragePressureObserver. r=jaws Differential Revision: https://phabricator.services.mozilla.com/D9125
browser/base/content/browser.js
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -555,17 +555,17 @@ const gStoragePressureObserver = {
     let prefStrBundle = document.getElementById("bundle_preferences");
     let brandShortName = document.getElementById("bundle_brand").getString("brandShortName");
     buttons.push({
       label: prefStrBundle.getString("spaceAlert.learnMoreButton.label"),
       accessKey: prefStrBundle.getString("spaceAlert.learnMoreButton.accesskey"),
       callback(notificationBar, button) {
         let learnMoreURL = Services.urlFormatter.formatURLPref("app.support.baseURL") + "storage-permissions";
         // This is a content URL, loaded from trusted UX.
-        gBrowser.selectedTab = gBrowser.addTrustedTab(learnMoreURL);
+        openTrustedLinkIn(learnMoreURL, "tab");
       },
     });
     if (usage < USAGE_THRESHOLD_BYTES) {
       // The firefox-used space < 5GB, then warn user to free some disk space.
       // This is because this usage is small and not the main cause for space issue.
       // In order to avoid the bad and wrong impression among users that
       // firefox eats disk space a lot, indicate users to clean up other disk space.
       msg = prefStrBundle.getFormattedString("spaceAlert.under5GB.message", [brandShortName]);