From 5b24c562b90afe6e17429611aad85ffc1a65f414 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 20 Sep 2022 20:17:36 +0000 Subject: [PATCH] Bug 1790277 - Convert FromValidation JSM modules to ESMs. r=mconley. Differential Revision: https://phabricator.services.mozilla.com/D157168 --- .../{FormValidationChild.jsm => FormValidationChild.sys.mjs} | 4 +--- ...{FormValidationParent.jsm => FormValidationParent.sys.mjs} | 4 +--- browser/actors/moz.build | 4 ++-- browser/components/BrowserGlue.jsm | 4 ++-- 4 files changed, 6 insertions(+), 10 deletions(-) rename browser/actors/{FormValidationChild.jsm => FormValidationChild.sys.mjs} (98%) rename browser/actors/{FormValidationParent.jsm => FormValidationParent.sys.mjs} (98%) diff --git a/browser/actors/FormValidationChild.jsm b/browser/actors/FormValidationChild.sys.mjs similarity index 98% rename from browser/actors/FormValidationChild.jsm rename to browser/actors/FormValidationChild.sys.mjs index 59e1c916b26e..7e18509de79c 100644 --- a/browser/actors/FormValidationChild.jsm +++ b/browser/actors/FormValidationChild.sys.mjs @@ -8,13 +8,11 @@ * the display of the help panel on invalid elements. */ -var EXPORTED_SYMBOLS = ["FormValidationChild"]; - const { LayoutUtils } = ChromeUtils.import( "resource://gre/modules/LayoutUtils.jsm" ); -class FormValidationChild extends JSWindowActorChild { +export class FormValidationChild extends JSWindowActorChild { constructor() { super(); this._validationMessage = ""; diff --git a/browser/actors/FormValidationParent.jsm b/browser/actors/FormValidationParent.sys.mjs similarity index 98% rename from browser/actors/FormValidationParent.jsm rename to browser/actors/FormValidationParent.sys.mjs index b1a12dd278b5..98c3a13f7697 100644 --- a/browser/actors/FormValidationParent.jsm +++ b/browser/actors/FormValidationParent.sys.mjs @@ -8,8 +8,6 @@ "use strict"; -var EXPORTED_SYMBOLS = ["FormValidationParent"]; - const lazy = {}; ChromeUtils.defineModuleGetter( @@ -44,7 +42,7 @@ class PopupShownObserver { ]); } -class FormValidationParent extends JSWindowActorParent { +export class FormValidationParent extends JSWindowActorParent { constructor() { super(); diff --git a/browser/actors/moz.build b/browser/actors/moz.build index fddb9a48a181..2068d1787cfe 100644 --- a/browser/actors/moz.build +++ b/browser/actors/moz.build @@ -63,8 +63,8 @@ FINAL_TARGET_FILES.actors += [ "DOMFullscreenParent.jsm", "EncryptedMediaChild.jsm", "EncryptedMediaParent.jsm", - "FormValidationChild.jsm", - "FormValidationParent.jsm", + "FormValidationChild.sys.mjs", + "FormValidationParent.sys.mjs", "LightweightThemeChild.jsm", "LinkHandlerChild.jsm", "LinkHandlerParent.jsm", diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm index a5366c0bab78..cc62bbd73b44 100644 --- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -535,11 +535,11 @@ let JSWINDOWACTORS = { FormValidation: { parent: { - moduleURI: "resource:///actors/FormValidationParent.jsm", + esModuleURI: "resource:///actors/FormValidationParent.sys.mjs", }, child: { - moduleURI: "resource:///actors/FormValidationChild.jsm", + esModuleURI: "resource:///actors/FormValidationChild.sys.mjs", events: { MozInvalidForm: {}, // Listening to ‘pageshow’ event is only relevant if an invalid form