Bug 1788765 - Convert browser/actors/AboutNewTab* JSM modules to ESMs r=mconley

Differential Revision: https://phabricator.services.mozilla.com/D157055
This commit is contained in:
achris16 2022-09-12 16:29:09 +00:00
Родитель 850b97d92f
Коммит 8eb399bdd5
4 изменённых файлов: 8 добавлений и 15 удалений

Просмотреть файл

@ -4,11 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
var EXPORTED_SYMBOLS = ["AboutNewTabChild"];
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
@ -30,7 +27,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
false
);
class AboutNewTabChild extends JSWindowActorChild {
export class AboutNewTabChild extends JSWindowActorChild {
handleEvent(event) {
if (event.type == "DOMContentLoaded") {
// If the separate about:welcome page is enabled, we can skip all of this,

Просмотреть файл

@ -4,11 +4,7 @@
"use strict";
var EXPORTED_SYMBOLS = ["AboutNewTabParent"];
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
const lazy = {};
@ -16,7 +12,7 @@ XPCOMUtils.defineLazyModuleGetters(lazy, {
ASRouter: "resource://activity-stream/lib/ASRouter.jsm",
});
class AboutNewTabParent extends JSWindowActorParent {
export class AboutNewTabParent extends JSWindowActorParent {
async receiveMessage(message) {
switch (message.name) {
case "AboutNewTabVisible":

Просмотреть файл

@ -32,8 +32,8 @@ with Files("WebRTCChild.jsm"):
BUG_COMPONENT = ("Firefox", "Site Permissions")
FINAL_TARGET_FILES.actors += [
"AboutNewTabChild.jsm",
"AboutNewTabParent.jsm",
"AboutNewTabChild.sys.mjs",
"AboutNewTabParent.sys.mjs",
"AboutPluginsChild.sys.mjs",
"AboutPluginsParent.sys.mjs",
"AboutPocketChild.jsm",

Просмотреть файл

@ -248,10 +248,10 @@ let JSWINDOWACTORS = {
AboutNewTab: {
parent: {
moduleURI: "resource:///actors/AboutNewTabParent.jsm",
esModuleURI: "resource:///actors/AboutNewTabParent.sys.mjs",
},
child: {
moduleURI: "resource:///actors/AboutNewTabChild.jsm",
esModuleURI: "resource:///actors/AboutNewTabChild.sys.mjs",
events: {
DOMContentLoaded: {},
pageshow: {},