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:
@@ -89,7 +89,7 @@ var contentScripts = new DefaultWeakMap(matcher => {
|
||||
});
|
||||
|
||||
function getMessageManager(window) {
|
||||
let docShell = window.document.docShell.QueryInterface(Ci.nsIInterfaceRequestor);
|
||||
let docShell = window.docShell.QueryInterface(Ci.nsIInterfaceRequestor);
|
||||
try {
|
||||
return docShell.getInterface(Ci.nsIContentFrameMessageManager);
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user