Open Bug 1480041 Opened 6 years ago Updated 2 years ago

Use CPOW detection to take getTabForBrowser shortcut in _getTabForContentWindow

Categories

(Firefox :: Tabbed Browser, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox63 --- affected

People

(Reporter: Gijs, Unassigned)

Details

https://searchfox.org/mozilla-central/source/browser/base/content/tabbrowser.js#657-666

Does:

    // When not using remote browsers, we can take a fast path by getting
    // directly from the content window to the browser without looping
    // over all browsers.
    if (!gMultiProcessBrowser) {
      let browser = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                           .getInterface(Ci.nsIWebNavigation)
                           .QueryInterface(Ci.nsIDocShell)
                           .chromeEventHandler;
      return this.getTabForBrowser(browser);
    }


AIUI we could just use Cu.isCrossProcessWrapper(), and then this would also work for e.g. about:preferences or about:addons tabs in e10s windows.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.