Bug 1463291: Move docShell getter from Document to Window. r=bz

DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL
This commit is contained in:
Kris Maglione
2018-05-21 16:58:23 -07:00
parent 9ba14892f2
commit e97c582e3f
91 changed files with 116 additions and 121 deletions

View File

@@ -670,7 +670,7 @@ function handURIToExistingBrowser(uri, location, cmdLine, forcePrivate, triggeri
return;
}
var bwin = navWin.document.docShell.rootTreeItem.domWindow;
var bwin = navWin.docShell.rootTreeItem.domWindow;
bwin.openURI(uri, null, location,
Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL, triggeringPrincipal);
}