Bug 1628053, don't get the root window when adding the unload listener, r=mikedeboer

Differential Revision: https://phabricator.services.mozilla.com/D71453
This commit is contained in:
Neil Deakin 2020-05-11 10:33:28 +00:00
parent fa593c827a
commit 4e865e037b

View File

@ -55,7 +55,7 @@ function Finder(docShell) {
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebProgress)
.addProgressListener(this, Ci.nsIWebProgress.NOTIFY_LOCATION);
BrowserUtils.getRootWindow(this._docShell).addEventListener(
docShell.domWindow.addEventListener(
"unload",
this.onLocationChange.bind(this, { isTopLevel: true })
);