forked from mirrors/gecko-dev
Bug 1798634 - Converted AboutHttpsOnlyError JSM modules to ESM. r=kpatenio,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D167450
This commit is contained in:
parent
cfb5b51ba3
commit
a3d0c20309
5 changed files with 9 additions and 20 deletions
|
|
@ -515,7 +515,7 @@ var gIdentityHandler = {
|
||||||
let principal = gBrowser.contentPrincipal;
|
let principal = gBrowser.contentPrincipal;
|
||||||
// ...but if we're on the HTTPS-Only error page, the content-principal is
|
// ...but if we're on the HTTPS-Only error page, the content-principal is
|
||||||
// for HTTPS but. We always want to set the exception for HTTP. (Code should
|
// for HTTPS but. We always want to set the exception for HTTP. (Code should
|
||||||
// be almost identical to the one in AboutHttpsOnlyErrorParent.jsm)
|
// be almost identical to the one in AboutHttpsOnlyErrorParent.sys.mjs)
|
||||||
let newURI;
|
let newURI;
|
||||||
if (this._isAboutHttpsOnlyErrorPage) {
|
if (this._isAboutHttpsOnlyErrorPage) {
|
||||||
newURI = gBrowser.currentURI
|
newURI = gBrowser.currentURI
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,8 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["AboutHttpsOnlyErrorChild"];
|
|
||||||
|
|
||||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
const { RemotePageChild } = ChromeUtils.import(
|
const { RemotePageChild } = ChromeUtils.import(
|
||||||
"resource://gre/actors/RemotePageChild.jsm"
|
"resource://gre/actors/RemotePageChild.jsm"
|
||||||
);
|
);
|
||||||
|
|
@ -21,7 +16,7 @@ XPCOMUtils.defineLazyServiceGetter(
|
||||||
"nsISerializationHelper"
|
"nsISerializationHelper"
|
||||||
);
|
);
|
||||||
|
|
||||||
class AboutHttpsOnlyErrorChild extends RemotePageChild {
|
export class AboutHttpsOnlyErrorChild extends RemotePageChild {
|
||||||
actorCreated() {
|
actorCreated() {
|
||||||
super.actorCreated();
|
super.actorCreated();
|
||||||
|
|
||||||
|
|
@ -2,16 +2,10 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["AboutHttpsOnlyErrorParent"];
|
|
||||||
|
|
||||||
const { HomePage } = ChromeUtils.import("resource:///modules/HomePage.jsm");
|
const { HomePage } = ChromeUtils.import("resource:///modules/HomePage.jsm");
|
||||||
const { PrivateBrowsingUtils } = ChromeUtils.importESModule(
|
import { PrivateBrowsingUtils } from "resource://gre/modules/PrivateBrowsingUtils.sys.mjs";
|
||||||
"resource://gre/modules/PrivateBrowsingUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
class AboutHttpsOnlyErrorParent extends JSWindowActorParent {
|
export class AboutHttpsOnlyErrorParent extends JSWindowActorParent {
|
||||||
get browser() {
|
get browser() {
|
||||||
return this.browsingContext.top.embedderElement;
|
return this.browsingContext.top.embedderElement;
|
||||||
}
|
}
|
||||||
|
|
@ -33,8 +33,8 @@ TESTING_JS_MODULES += [
|
||||||
]
|
]
|
||||||
|
|
||||||
FINAL_TARGET_FILES.actors += [
|
FINAL_TARGET_FILES.actors += [
|
||||||
"AboutHttpsOnlyErrorChild.jsm",
|
"AboutHttpsOnlyErrorChild.sys.mjs",
|
||||||
"AboutHttpsOnlyErrorParent.jsm",
|
"AboutHttpsOnlyErrorParent.sys.mjs",
|
||||||
"AudioPlaybackChild.jsm",
|
"AudioPlaybackChild.jsm",
|
||||||
"AudioPlaybackParent.jsm",
|
"AudioPlaybackParent.jsm",
|
||||||
"AutoCompleteChild.jsm",
|
"AutoCompleteChild.jsm",
|
||||||
|
|
|
||||||
|
|
@ -77,10 +77,10 @@ let JSWINDOWACTORS = {
|
||||||
|
|
||||||
AboutHttpsOnlyError: {
|
AboutHttpsOnlyError: {
|
||||||
parent: {
|
parent: {
|
||||||
moduleURI: "resource://gre/actors/AboutHttpsOnlyErrorParent.jsm",
|
esModuleURI: "resource://gre/actors/AboutHttpsOnlyErrorParent.sys.mjs",
|
||||||
},
|
},
|
||||||
child: {
|
child: {
|
||||||
moduleURI: "resource://gre/actors/AboutHttpsOnlyErrorChild.jsm",
|
esModuleURI: "resource://gre/actors/AboutHttpsOnlyErrorChild.sys.mjs",
|
||||||
events: {
|
events: {
|
||||||
DOMDocElementInserted: {},
|
DOMDocElementInserted: {},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue