Skip to content

Commit 5aa757e

Browse files
committed
Bug 1790280 - Convert browser/actors/PageInfoChild.jsm JSM module to ESM. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D157604
1 parent 2833e78 commit 5aa757e

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

browser/actors/PageInfoChild.jsm renamed to browser/actors/PageInfoChild.sys.mjs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
var EXPORTED_SYMBOLS = ["PageInfoChild"];
6-
7-
const { XPCOMUtils } = ChromeUtils.importESModule(
8-
"resource://gre/modules/XPCOMUtils.sys.mjs"
9-
);
5+
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
106

117
const lazy = {};
128

@@ -16,7 +12,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
1612
setTimeout: "resource://gre/modules/Timer.jsm",
1713
});
1814

19-
class PageInfoChild extends JSWindowActorChild {
15+
export class PageInfoChild extends JSWindowActorChild {
2016
async receiveMessage(message) {
2117
let window = this.contentWindow;
2218
let document = window.document;

browser/actors/moz.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ with Files("AboutReaderParent.jsm"):
1616
with Files("LightweightThemeChild.jsm"):
1717
BUG_COMPONENT = ("WebExtensions", "Themes")
1818

19-
with Files("PageInfoChild.jsm"):
19+
with Files("PageInfoChild.sys.mjs"):
2020
BUG_COMPONENT = ("Firefox", "Page Info Window")
2121

2222
with Files("PageStyleChild.jsm"):
@@ -70,7 +70,7 @@ FINAL_TARGET_FILES.actors += [
7070
"LinkHandlerParent.jsm",
7171
"NetErrorChild.jsm",
7272
"NetErrorParent.jsm",
73-
"PageInfoChild.jsm",
73+
"PageInfoChild.sys.mjs",
7474
"PageStyleChild.jsm",
7575
"PageStyleParent.jsm",
7676
"PluginChild.jsm",

browser/components/BrowserGlue.jsm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ let JSWINDOWACTORS = {
610610

611611
PageInfo: {
612612
child: {
613-
moduleURI: "resource:///actors/PageInfoChild.jsm",
613+
esModuleURI: "resource:///actors/PageInfoChild.sys.mjs",
614614
},
615615

616616
allFrames: true,

0 commit comments

Comments
 (0)