Skip to content

Commit a99307f

Browse files
committed
Bug 1822221 - Convert browser/actors/LinkHandler* JSMs to ESMs. r=kpatenio,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D172542
1 parent e7a4fa8 commit a99307f

File tree

7 files changed

+11
-21
lines changed

7 files changed

+11
-21
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
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-
"use strict";
6-
7-
const EXPORTED_SYMBOLS = ["LinkHandlerChild"];
8-
95
const lazy = {};
106

117
ChromeUtils.defineModuleGetter(
@@ -14,7 +10,7 @@ ChromeUtils.defineModuleGetter(
1410
"resource:///modules/FaviconLoader.jsm"
1511
);
1612

17-
class LinkHandlerChild extends JSWindowActorChild {
13+
export class LinkHandlerChild extends JSWindowActorChild {
1814
constructor() {
1915
super();
2016

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
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-
"use strict";
6-
7-
const EXPORTED_SYMBOLS = ["LinkHandlerParent"];
8-
95
const lazy = {};
106

117
ChromeUtils.defineESModuleGetters(lazy, {
@@ -14,7 +10,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
1410

1511
let gTestListeners = new Set();
1612

17-
class LinkHandlerParent extends JSWindowActorParent {
13+
export class LinkHandlerParent extends JSWindowActorParent {
1814
static addListenerForTests(listener) {
1915
gTestListeners.add(listener);
2016
}

browser/actors/moz.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ FINAL_TARGET_FILES.actors += [
6565
"FormValidationChild.sys.mjs",
6666
"FormValidationParent.sys.mjs",
6767
"LightweightThemeChild.jsm",
68-
"LinkHandlerChild.jsm",
69-
"LinkHandlerParent.jsm",
68+
"LinkHandlerChild.sys.mjs",
69+
"LinkHandlerParent.sys.mjs",
7070
"PageInfoChild.sys.mjs",
7171
"PageStyleChild.sys.mjs",
7272
"PageStyleParent.sys.mjs",

browser/base/content/test/favicons/head.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
* http://creativecommons.org/publicdomain/zero/1.0/ */
33

44
ChromeUtils.defineESModuleGetters(this, {
5+
LinkHandlerParent: "resource:///actors/LinkHandlerParent.sys.mjs",
56
PlacesTestUtils: "resource://testing-common/PlacesTestUtils.sys.mjs",
67
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
8+
79
XPCShellContentUtils:
810
"resource://testing-common/XPCShellContentUtils.sys.mjs",
911
});
1012

11-
XPCOMUtils.defineLazyModuleGetters(this, {
12-
LinkHandlerParent: "resource:///actors/LinkHandlerParent.jsm",
13-
});
14-
1513
// Clear the network cache between every test to make sure we get a stable state
1614
Services.cache2.clear();
1715

browser/base/content/test/performance/browser_startup_content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const known_scripts = {
3232

3333
// Browser front-end
3434
"resource:///actors/AboutReaderChild.sys.mjs",
35-
"resource:///actors/LinkHandlerChild.jsm",
35+
"resource:///actors/LinkHandlerChild.sys.mjs",
3636
"resource:///actors/SearchSERPTelemetryChild.sys.mjs",
3737
"resource://gre/actors/ContentMetaChild.sys.mjs",
3838
"resource://gre/modules/Readerable.jsm",

browser/components/BrowserGlue.sys.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,10 +581,10 @@ let JSWINDOWACTORS = {
581581

582582
LinkHandler: {
583583
parent: {
584-
moduleURI: "resource:///actors/LinkHandlerParent.jsm",
584+
esModuleURI: "resource:///actors/LinkHandlerParent.sys.mjs",
585585
},
586586
child: {
587-
moduleURI: "resource:///actors/LinkHandlerChild.jsm",
587+
esModuleURI: "resource:///actors/LinkHandlerChild.sys.mjs",
588588
events: {
589589
DOMHeadElementParsed: {},
590590
DOMLinkAdded: {},

devtools/client/netmonitor/test/head.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Services.scriptloader.loadSubScript(
2222
this
2323
);
2424

25-
const { LinkHandlerParent } = ChromeUtils.import(
26-
"resource:///actors/LinkHandlerParent.jsm"
25+
const { LinkHandlerParent } = ChromeUtils.importESModule(
26+
"resource:///actors/LinkHandlerParent.sys.mjs"
2727
);
2828

2929
const {

0 commit comments

Comments
 (0)