Bug 1612951 - Replace the usages of nsIDocShellTreeItem with BrowsingContext in about:performance. r=florian
authorTetsuharu OHZEKI <tetsuharu.ohzeki@gmail.com>
Wed, 05 Feb 2020 15:24:29 +0000
changeset 512769 caed697fb694d70f40b2d5abb7d91fd9cd56cef8
parent 512768 f0cb6e48329b48f141f5c75edbcb38ba20228414
child 512770 1188d4a563355f444b705e85f66110486df9f5b0
push id37097
push usercsabou@mozilla.com
push dateThu, 06 Feb 2020 21:47:20 +0000
treeherdermozilla-central@b372743705c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflorian
bugs1612951
milestone74.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 1612951 - Replace the usages of nsIDocShellTreeItem with BrowsingContext in about:performance. r=florian `nsIDocShellTreeItem.rootTreeItem` has been deprecated. We should use an approach based on BrowsingContext. Differential Revision: https://phabricator.services.mozilla.com/D61496
toolkit/components/aboutperformance/content/aboutPerformance.js
--- a/toolkit/components/aboutperformance/content/aboutPerformance.js
+++ b/toolkit/components/aboutperformance/content/aboutPerformance.js
@@ -685,17 +685,18 @@ var Control = {
         this._removeSubtree(row);
         row.remove();
         return;
       }
 
       if (target.classList.contains("addon-icon")) {
         let row = target.parentNode.parentNode;
         let id = row.windowId;
-        let parentWin = window.docShell.rootTreeItem.domWindow;
+        let parentWin =
+          window.docShell.browsingContext.embedderElement.ownerGlobal;
         parentWin.BrowserOpenAddonsMgr(
           "addons://detail/" + encodeURIComponent(id)
         );
         return;
       }
 
       // Handle selection changes
       let row = target.parentNode;