Bug 1462121 - Ignore untrusted pagehide/pageshow events
MozReview-Commit-ID: AiSUarMT1GF
--- a/toolkit/components/extensions/ExtensionCommon.jsm
+++ b/toolkit/components/extensions/ExtensionCommon.jsm
@@ -173,18 +173,18 @@ class BaseContext {
this.contentWindow = null;
this.active = false;
}
},
};
this.contentWindow = contentWindow;
this.active = true;
- contentWindow.addEventListener("pagehide", handler, {mozSystemGroup: true});
- contentWindow.addEventListener("pageshow", handler, {mozSystemGroup: true});
+ contentWindow.addEventListener("pagehide", handler, {mozSystemGroup: true}, false);
+ contentWindow.addEventListener("pageshow", handler, {mozSystemGroup: true}, false);
this.callOnClose({
close: () => {
if (isValidInnerWindow()) {
contentWindow.removeEventListener("pagehide", handler, {mozSystemGroup: true});
contentWindow.removeEventListener("pageshow", handler, {mozSystemGroup: true});
}
// Replace handler to release the original handleEvent closure.
handler.handleEvent = function(event) {