Bug 1462121 - Remove unused docShell member
MozReview-Commit-ID: GsnJ8qcLhXp
--- a/toolkit/components/extensions/ExtensionCommon.jsm
+++ b/toolkit/components/extensions/ExtensionCommon.jsm
@@ -130,47 +130,43 @@ class BaseContext {
this._lastError = null;
this.contextId = getUniqueId();
this.unloaded = false;
this.extension = extension;
this.jsonSandbox = null;
this.active = true;
this.incognito = null;
this.messageManager = null;
- this.docShell = null;
this.contentWindow = null;
this.innerWindowID = 0;
}
setContentWindow(contentWindow) {
let {document} = contentWindow;
- let {docShell} = document;
this.innerWindowID = getInnerWindowID(contentWindow);
- this.messageManager = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
+ this.messageManager = document.docShell.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIContentFrameMessageManager);
if (this.incognito == null) {
this.incognito = PrivateBrowsingUtils.isContentWindowPrivate(contentWindow);
}
MessageChannel.setupMessageManagers([this.messageManager]);
let onPageShow = event => {
if (!event || event.target === document) {
- this.docShell = docShell;
this.contentWindow = contentWindow;
this.active = true;
}
};
let onPageHide = event => {
if (!event || event.target === document) {
// Put this off until the next tick.
Promise.resolve().then(() => {
- this.docShell = null;
this.contentWindow = null;
this.active = false;
});
}
};
onPageShow();
contentWindow.addEventListener("pagehide", onPageHide, {mozSystemGroup: true});