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;
|
||||
// ...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
|
||||
// be almost identical to the one in AboutHttpsOnlyErrorParent.jsm)
|
||||
// be almost identical to the one in AboutHttpsOnlyErrorParent.sys.mjs)
|
||||
let newURI;
|
||||
if (this._isAboutHttpsOnlyErrorPage) {
|
||||
newURI = gBrowser.currentURI
|
||||
|
|
|
|||
|
|
@ -2,13 +2,8 @@
|
|||
* 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/. */
|
||||
|
||||
"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(
|
||||
"resource://gre/actors/RemotePageChild.jsm"
|
||||
);
|
||||
|
|
@ -21,7 +16,7 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||
"nsISerializationHelper"
|
||||
);
|
||||
|
||||
class AboutHttpsOnlyErrorChild extends RemotePageChild {
|
||||
export class AboutHttpsOnlyErrorChild extends RemotePageChild {
|
||||
actorCreated() {
|
||||
super.actorCreated();
|
||||
|
||||
|
|
@ -2,16 +2,10 @@
|
|||
* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
var EXPORTED_SYMBOLS = ["AboutHttpsOnlyErrorParent"];
|
||||
|
||||
const { HomePage } = ChromeUtils.import("resource:///modules/HomePage.jsm");
|
||||
const { PrivateBrowsingUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/PrivateBrowsingUtils.sys.mjs"
|
||||
);
|
||||
import { PrivateBrowsingUtils } from "resource://gre/modules/PrivateBrowsingUtils.sys.mjs";
|
||||
|
||||
class AboutHttpsOnlyErrorParent extends JSWindowActorParent {
|
||||
export class AboutHttpsOnlyErrorParent extends JSWindowActorParent {
|
||||
get browser() {
|
||||
return this.browsingContext.top.embedderElement;
|
||||
}
|
||||
|
|
@ -33,8 +33,8 @@ TESTING_JS_MODULES += [
|
|||
]
|
||||
|
||||
FINAL_TARGET_FILES.actors += [
|
||||
"AboutHttpsOnlyErrorChild.jsm",
|
||||
"AboutHttpsOnlyErrorParent.jsm",
|
||||
"AboutHttpsOnlyErrorChild.sys.mjs",
|
||||
"AboutHttpsOnlyErrorParent.sys.mjs",
|
||||
"AudioPlaybackChild.jsm",
|
||||
"AudioPlaybackParent.jsm",
|
||||
"AutoCompleteChild.jsm",
|
||||
|
|
|
|||
|
|
@ -77,10 +77,10 @@ let JSWINDOWACTORS = {
|
|||
|
||||
AboutHttpsOnlyError: {
|
||||
parent: {
|
||||
moduleURI: "resource://gre/actors/AboutHttpsOnlyErrorParent.jsm",
|
||||
esModuleURI: "resource://gre/actors/AboutHttpsOnlyErrorParent.sys.mjs",
|
||||
},
|
||||
child: {
|
||||
moduleURI: "resource://gre/actors/AboutHttpsOnlyErrorChild.jsm",
|
||||
esModuleURI: "resource://gre/actors/AboutHttpsOnlyErrorChild.sys.mjs",
|
||||
events: {
|
||||
DOMDocElementInserted: {},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue