Issue #1252 - Remove fragile fast path.

This resolves #1252.
This commit is contained in:
wolfbeast 2019-11-04 11:40:18 +00:00 committed by Roy Tam
commit c7212a0d1a

View file

@ -383,17 +383,6 @@
<parameter name="aWindow"/>
<body>
<![CDATA[
// 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);
}
for (let i = 0; i < this.browsers.length; i++) {
// NB: We use contentWindowAsCPOW so that this code works both
// for remote browsers as well. aWindow may be a CPOW.