From dea0c360fc88a65e45c1edb9cb55592becfa812c Mon Sep 17 00:00:00 2001 From: Martin Giger Date: Wed, 12 Oct 2022 21:42:15 +1100 Subject: [PATCH] Bug 1792869 - Convert XPCOMUtils imports to esm in mail/. r=mkmelin Differential Revision: https://phabricator.services.mozilla.com/D159064 --HG-- extra : rebase_source : a74bfd3d9a95c0754fdc0d871f5e682fd9de706b extra : amend_source : 47dbe6b209047deaac51409a63a4f0dcf292af6c --- mail/actors/LinkClickHandlerChild.jsm | 4 ++-- mail/actors/LinkClickHandlerParent.jsm | 4 ++-- mail/base/content/about3Pane.js | 4 ++-- mail/base/content/aboutDialog-appUpdater.js | 4 ++-- mail/base/content/aboutMessage.js | 4 ++-- mail/base/content/contentAreaClick.js | 4 ++-- mail/base/content/folderDisplay.js | 4 ++-- mail/base/content/folderPane.js | 4 ++-- mail/base/content/mailContext.js | 4 ++-- mail/base/content/mailCore.js | 4 ++-- mail/base/content/mailWindow.js | 4 ++-- mail/base/content/mailWindowOverlay.js | 4 ++-- mail/base/content/messageWindow.js | 4 ++-- mail/base/content/msgHdrView.js | 4 ++-- mail/base/content/msgSecurityPane.js | 4 ++-- mail/base/content/multimessageview.js | 4 ++-- mail/base/content/nsContextMenu.js | 4 ++-- mail/base/content/printUtils.js | 4 ++-- mail/base/content/shortcutsOverlay.js | 4 ++-- mail/base/content/specialTabs.js | 4 ++-- mail/base/content/viewSource.js | 4 ++-- mail/base/content/widgets/gloda-autocomplete-input.js | 4 ++-- mail/base/test/unit/head_mailbase.js | 4 ++-- mail/components/MailGlue.jsm | 4 ++-- mail/components/about-support/content/aboutSupport.js | 4 ++-- mail/components/accountcreation/ExchangeAutoDiscover.jsm | 4 ++-- mail/components/accountcreation/content/accountSetup.js | 4 ++-- mail/components/activity/modules/glodaIndexer.jsm | 4 ++-- mail/components/addrbook/content/aboutAddressBook.js | 4 ++-- mail/components/customizableui/CustomizableUI.jsm | 4 ++-- mail/components/customizableui/CustomizableWidgets.jsm | 4 ++-- mail/components/customizableui/PanelMultiView.jsm | 4 ++-- mail/components/customizableui/content/panelUI.js | 4 ++-- mail/components/enterprisepolicies/content/aboutPolicies.js | 4 ++-- mail/components/extensions/ExtensionBrowsingData.jsm | 4 ++-- mail/components/extensions/ExtensionPopups.jsm | 4 ++-- mail/components/extensions/MailExtensionShortcuts.jsm | 4 ++-- mail/components/extensions/parent/ext-addressBook.js | 4 ++-- mail/components/extensions/parent/ext-compose.js | 4 ++-- mail/components/extensions/parent/ext-mail.js | 4 ++-- mail/components/extensions/parent/ext-mailTabs.js | 4 ++-- mail/components/extensions/parent/ext-spacesToolbar.js | 4 ++-- .../extensions/test/xpcshell/test_ext_addressBook.js | 4 ++-- mail/components/im/modules/ChatEncryption.sys.mjs | 5 ++--- mail/components/im/modules/index_im.sys.mjs | 4 +--- mail/components/migration/src/ThunderbirdProfileMigrator.jsm | 4 ++-- mail/components/newmailaccount/content/accountProvisioner.js | 4 ++-- mail/components/newmailaccount/content/uriListener.js | 4 ++-- mail/components/preferences/general.js | 4 ++-- mail/components/preferences/passwordManager.js | 4 ++-- mail/components/preferences/preferencesTab.js | 4 ++-- mail/components/preferences/privacy.js | 4 ++-- mail/components/prompts/PromptCollection.jsm | 4 ++-- mail/components/test/unit/head_mailcomponents.js | 4 ++-- mail/extensions/openpgp/content/BondOpenPGP.jsm | 4 ++-- mail/extensions/openpgp/content/modules/CollectedKeysDB.jsm | 4 ++-- mail/extensions/openpgp/content/modules/GPGME.jsm | 4 ++-- mail/extensions/openpgp/content/modules/RNP.jsm | 4 ++-- mail/extensions/openpgp/content/modules/RNPLib.jsm | 4 ++-- mail/extensions/openpgp/content/modules/armor.jsm | 4 ++-- mail/extensions/openpgp/content/modules/autocrypt.jsm | 4 ++-- mail/extensions/openpgp/content/modules/core.jsm | 4 ++-- .../openpgp/content/modules/cryptoAPI/GnuPGCryptoAPI.jsm | 4 ++-- mail/extensions/openpgp/content/modules/decryption.jsm | 4 ++-- mail/extensions/openpgp/content/modules/dialog.jsm | 4 ++-- mail/extensions/openpgp/content/modules/encryption.jsm | 4 ++-- mail/extensions/openpgp/content/modules/filters.jsm | 4 ++-- mail/extensions/openpgp/content/modules/fixExchangeMsg.jsm | 4 ++-- mail/extensions/openpgp/content/modules/funcs.jsm | 4 ++-- mail/extensions/openpgp/content/modules/key.jsm | 4 ++-- mail/extensions/openpgp/content/modules/keyLookupHelper.jsm | 4 ++-- mail/extensions/openpgp/content/modules/keyObj.jsm | 4 ++-- .../extensions/openpgp/content/modules/keyRefreshService.jsm | 4 ++-- mail/extensions/openpgp/content/modules/keyRing.jsm | 4 ++-- mail/extensions/openpgp/content/modules/keyserver.jsm | 4 ++-- mail/extensions/openpgp/content/modules/masterpass.jsm | 4 ++-- mail/extensions/openpgp/content/modules/mime.jsm | 4 ++-- mail/extensions/openpgp/content/modules/mimeDecrypt.jsm | 4 ++-- mail/extensions/openpgp/content/modules/mimeEncrypt.jsm | 4 ++-- mail/extensions/openpgp/content/modules/mimeVerify.jsm | 4 ++-- mail/extensions/openpgp/content/modules/msgRead.jsm | 4 ++-- mail/extensions/openpgp/content/modules/persistentCrypto.jsm | 4 ++-- mail/extensions/openpgp/content/modules/pgpmimeHandler.jsm | 4 ++-- mail/extensions/openpgp/content/modules/sqliteDb.jsm | 4 ++-- mail/extensions/openpgp/content/modules/streams.jsm | 4 ++-- mail/extensions/openpgp/content/modules/webKey.jsm | 4 ++-- mail/extensions/openpgp/content/modules/windows.jsm | 4 ++-- mail/extensions/openpgp/content/modules/wkdLookup.jsm | 4 ++-- mail/extensions/openpgp/content/modules/wksMimeHandler.jsm | 4 ++-- .../openpgp/content/ui/enigmailMessengerOverlay.js | 4 ++-- .../openpgp/content/ui/enigmailMsgHdrViewOverlay.js | 4 ++-- mail/extensions/openpgp/content/ui/keyAssistant.js | 4 ++-- mail/modules/AppUpdateUI.jsm | 4 ++-- mail/modules/ExtensionsUI.jsm | 4 ++-- mail/modules/MailMigrator.jsm | 4 ++-- mail/modules/PhishingDetector.jsm | 4 ++-- mail/modules/ShortcutsManager.jsm | 4 ++-- mail/modules/TBDistCustomizer.jsm | 4 ++-- mail/modules/UIDensity.jsm | 4 ++-- mail/modules/UIFontSize.jsm | 4 ++-- mail/modules/WindowsJumpLists.jsm | 4 ++-- mail/test/browser/notification/browser_notification.js | 4 ++-- mail/test/browser/shared-modules/OpenPGPTestUtils.jsm | 4 ++-- mail/test/browser/shared-modules/PromptHelpers.jsm | 4 ++-- mail/themes/BuiltInThemes.sys.mjs | 4 +--- 105 files changed, 208 insertions(+), 213 deletions(-) diff --git a/mail/actors/LinkClickHandlerChild.jsm b/mail/actors/LinkClickHandlerChild.jsm index 15da9a1898..a6bad5dbd6 100644 --- a/mail/actors/LinkClickHandlerChild.jsm +++ b/mail/actors/LinkClickHandlerChild.jsm @@ -10,8 +10,8 @@ const EXPORTED_SYMBOLS = [ "StrictLinkClickHandlerChild", ]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/actors/LinkClickHandlerParent.jsm b/mail/actors/LinkClickHandlerParent.jsm index 0e58ca80f0..5fc0dd2b90 100644 --- a/mail/actors/LinkClickHandlerParent.jsm +++ b/mail/actors/LinkClickHandlerParent.jsm @@ -10,8 +10,8 @@ const EXPORTED_SYMBOLS = [ "StrictLinkClickHandlerParent", ]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyScriptGetter( diff --git a/mail/base/content/about3Pane.js b/mail/base/content/about3Pane.js index d99501927f..1416aa3e71 100644 --- a/mail/base/content/about3Pane.js +++ b/mail/base/content/about3Pane.js @@ -12,8 +12,8 @@ var { DBViewWrapper } = ChromeUtils.import( var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/base/content/aboutDialog-appUpdater.js b/mail/base/content/aboutDialog-appUpdater.js index 6f57347280..2a4bddcb5b 100644 --- a/mail/base/content/aboutDialog-appUpdater.js +++ b/mail/base/content/aboutDialog-appUpdater.js @@ -5,8 +5,8 @@ // Note: this file is included in aboutDialog.xhtml and preferences/advanced.xhtml // if MOZ_UPDATER is defined. -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { DownloadUtils } = ChromeUtils.import( "resource://gre/modules/DownloadUtils.jsm" diff --git a/mail/base/content/aboutMessage.js b/mail/base/content/aboutMessage.js index f8d2648068..fc84f8bf0b 100644 --- a/mail/base/content/aboutMessage.js +++ b/mail/base/content/aboutMessage.js @@ -14,8 +14,8 @@ /* globals HideMessageHeaderPane, messageHeaderSink, gMessageListeners, OnLoadMsgHeaderPane, OnTagsChange, OnUnloadMsgHeaderPane */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/base/content/contentAreaClick.js b/mail/base/content/contentAreaClick.js index 9dcd805bf7..ba715494ed 100644 --- a/mail/base/content/contentAreaClick.js +++ b/mail/base/content/contentAreaClick.js @@ -10,8 +10,8 @@ var { PlacesUtils } = ChromeUtils.importESModule( "resource://gre/modules/PlacesUtils.sys.mjs" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { PhishingDetector: "resource:///modules/PhishingDetector.jsm", diff --git a/mail/base/content/folderDisplay.js b/mail/base/content/folderDisplay.js index fa1a6a53fc..2325446c58 100644 --- a/mail/base/content/folderDisplay.js +++ b/mail/base/content/folderDisplay.js @@ -6,8 +6,8 @@ /* import-globals-from mailWindow.js */ /* import-globals-from ../../extensions/mailviews/content/msgViewPickerOverlay.js */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/base/content/folderPane.js b/mail/base/content/folderPane.js index e96db5f99c..e26baa5752 100644 --- a/mail/base/content/folderPane.js +++ b/mail/base/content/folderPane.js @@ -11,8 +11,8 @@ /* import-globals-from folderDisplay.js */ /* import-globals-from mailWindow.js */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" diff --git a/mail/base/content/mailContext.js b/mail/base/content/mailContext.js index f592137fa5..73009ba5d2 100644 --- a/mail/base/content/mailContext.js +++ b/mail/base/content/mailContext.js @@ -11,8 +11,8 @@ var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var LazyModules = {}; diff --git a/mail/base/content/mailCore.js b/mail/base/content/mailCore.js index 67c264e0c8..2f0d3cc8a9 100644 --- a/mail/base/content/mailCore.js +++ b/mail/base/content/mailCore.js @@ -21,8 +21,8 @@ var { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyGetter(this, "gViewSourceUtils", function() { diff --git a/mail/base/content/mailWindow.js b/mail/base/content/mailWindow.js index 9048b9356a..feadc5700c 100644 --- a/mail/base/content/mailWindow.js +++ b/mail/base/content/mailWindow.js @@ -17,8 +17,8 @@ // From netError.js /* globals retryThis */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { appIdleManager: "resource:///modules/AppIdleManager.jsm", diff --git a/mail/base/content/mailWindowOverlay.js b/mail/base/content/mailWindowOverlay.js index e1443519f3..e94b1c9549 100644 --- a/mail/base/content/mailWindowOverlay.js +++ b/mail/base/content/mailWindowOverlay.js @@ -17,8 +17,8 @@ /* import-globals-from mailWindow.js */ /* import-globals-from utilityOverlay.js */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); ChromeUtils.defineESModuleGetters(this, { diff --git a/mail/base/content/messageWindow.js b/mail/base/content/messageWindow.js index 104778fcc5..f7a504f07f 100644 --- a/mail/base/content/messageWindow.js +++ b/mail/base/content/messageWindow.js @@ -24,8 +24,8 @@ var { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); ChromeUtils.defineESModuleGetters(this, { diff --git a/mail/base/content/msgHdrView.js b/mail/base/content/msgHdrView.js index 9485bff468..7abfba2b53 100644 --- a/mail/base/content/msgHdrView.js +++ b/mail/base/content/msgHdrView.js @@ -14,8 +14,8 @@ /* import-globals-from messageDisplay.js */ /* global Enigmail, showMessageReadSecurityInfo, onMessageSecurityPopupShown, onMessageSecurityPopupHidden */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" diff --git a/mail/base/content/msgSecurityPane.js b/mail/base/content/msgSecurityPane.js index be580c2fd5..d1e25298bd 100644 --- a/mail/base/content/msgSecurityPane.js +++ b/mail/base/content/msgSecurityPane.js @@ -10,8 +10,8 @@ /* globals gFolderDisplay, gSignatureStatus, Enigmail, gDBView */ /* globals showImapSignatureUnknown, loadSmimeMessageSecurityInfo */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/base/content/multimessageview.js b/mail/base/content/multimessageview.js index e7215d91e1..de7d737fa1 100644 --- a/mail/base/content/multimessageview.js +++ b/mail/base/content/multimessageview.js @@ -2,8 +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/. */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" diff --git a/mail/base/content/nsContextMenu.js b/mail/base/content/nsContextMenu.js index 0d8831a19a..416911bedc 100644 --- a/mail/base/content/nsContextMenu.js +++ b/mail/base/content/nsContextMenu.js @@ -19,8 +19,8 @@ var { PlacesUtils } = ChromeUtils.importESModule( var { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); ChromeUtils.defineModuleGetter( this, diff --git a/mail/base/content/printUtils.js b/mail/base/content/printUtils.js index 62e238e501..9886a951a4 100644 --- a/mail/base/content/printUtils.js +++ b/mail/base/content/printUtils.js @@ -2,8 +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/. */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); ChromeUtils.defineESModuleGetters(this, { diff --git a/mail/base/content/shortcutsOverlay.js b/mail/base/content/shortcutsOverlay.js index d6cdc8dcb0..2d062d891e 100644 --- a/mail/base/content/shortcutsOverlay.js +++ b/mail/base/content/shortcutsOverlay.js @@ -6,8 +6,8 @@ // Wrap in a block to prevent leaking to window scope. { - var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" + var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/base/content/specialTabs.js b/mail/base/content/specialTabs.js index ba6ec72930..efc814933a 100644 --- a/mail/base/content/specialTabs.js +++ b/mail/base/content/specialTabs.js @@ -7,8 +7,8 @@ /* import-globals-from mailWindow.js */ /* import-globals-from utilityOverlay.js */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { AddonManager } = ChromeUtils.import( "resource://gre/modules/AddonManager.jsm" diff --git a/mail/base/content/viewSource.js b/mail/base/content/viewSource.js index 52e82fafe1..1c54ce8549 100644 --- a/mail/base/content/viewSource.js +++ b/mail/base/content/viewSource.js @@ -6,8 +6,8 @@ /* globals gViewSourceUtils, internalSave, ZoomManager */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyScriptGetter( diff --git a/mail/base/content/widgets/gloda-autocomplete-input.js b/mail/base/content/widgets/gloda-autocomplete-input.js index 208c5c763a..99a784707f 100644 --- a/mail/base/content/widgets/gloda-autocomplete-input.js +++ b/mail/base/content/widgets/gloda-autocomplete-input.js @@ -22,8 +22,8 @@ customElements.whenDefined("autocomplete-input").then(() => { const { GlodaConstants } = ChromeUtils.import( "resource:///modules/gloda/GlodaConstants.jsm" ); - const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" + const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/base/test/unit/head_mailbase.js b/mail/base/test/unit/head_mailbase.js index dcc788a828..604e5e2209 100644 --- a/mail/base/test/unit/head_mailbase.js +++ b/mail/base/test/unit/head_mailbase.js @@ -1,8 +1,8 @@ var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { mailTestUtils } = ChromeUtils.import( "resource://testing-common/mailnews/MailTestUtils.jsm" diff --git a/mail/components/MailGlue.jsm b/mail/components/MailGlue.jsm index 55042a4d07..d9ff6a6f8d 100644 --- a/mail/components/MailGlue.jsm +++ b/mail/components/MailGlue.jsm @@ -7,8 +7,8 @@ var EXPORTED_SYMBOLS = ["MailGlue", "MailTelemetryForTests"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const { AppConstants } = ChromeUtils.import( diff --git a/mail/components/about-support/content/aboutSupport.js b/mail/components/about-support/content/aboutSupport.js index ab64f5cab3..6843db7dab 100644 --- a/mail/components/about-support/content/aboutSupport.js +++ b/mail/components/about-support/content/aboutSupport.js @@ -10,8 +10,8 @@ "use strict"; -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { Troubleshoot } = ChromeUtils.importESModule( "resource://gre/modules/Troubleshoot.sys.mjs" diff --git a/mail/components/accountcreation/ExchangeAutoDiscover.jsm b/mail/components/accountcreation/ExchangeAutoDiscover.jsm index cee33df23e..ec0674da06 100644 --- a/mail/components/accountcreation/ExchangeAutoDiscover.jsm +++ b/mail/components/accountcreation/ExchangeAutoDiscover.jsm @@ -7,8 +7,8 @@ const EXPORTED_SYMBOLS = ["fetchConfigFromExchange", "getAddonsList"]; var { AccountCreationUtils } = ChromeUtils.import( "resource:///modules/accountcreation/AccountCreationUtils.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/components/accountcreation/content/accountSetup.js b/mail/components/accountcreation/content/accountSetup.js index 06a6792a7c..13942b5ea5 100644 --- a/mail/components/accountcreation/content/accountSetup.js +++ b/mail/components/accountcreation/content/accountSetup.js @@ -11,8 +11,8 @@ var { AccountCreationUtils } = ChromeUtils.import( var { fetchConfigFromExchange, getAddonsList } = ChromeUtils.import( "resource:///modules/accountcreation/ExchangeAutoDiscover.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/components/activity/modules/glodaIndexer.jsm b/mail/components/activity/modules/glodaIndexer.jsm index 3d78d5fd4d..a646cd9379 100644 --- a/mail/components/activity/modules/glodaIndexer.jsm +++ b/mail/components/activity/modules/glodaIndexer.jsm @@ -16,8 +16,8 @@ var nsActEvent = Components.Constructor( "init" ); -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/components/addrbook/content/aboutAddressBook.js b/mail/components/addrbook/content/aboutAddressBook.js index 63586e0270..3efaf5e985 100644 --- a/mail/components/addrbook/content/aboutAddressBook.js +++ b/mail/components/addrbook/content/aboutAddressBook.js @@ -15,8 +15,8 @@ var { UIFontSize } = ChromeUtils.import("resource:///modules/UIFontSize.jsm"); var { IMServices } = ChromeUtils.importESModule( "resource:///modules/IMServices.sys.mjs" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyGetter(this, "ABQueryUtils", function() { diff --git a/mail/components/customizableui/CustomizableUI.jsm b/mail/components/customizableui/CustomizableUI.jsm index d43bbdd8c7..ef0a80ce2f 100644 --- a/mail/components/customizableui/CustomizableUI.jsm +++ b/mail/components/customizableui/CustomizableUI.jsm @@ -5,8 +5,8 @@ var EXPORTED_SYMBOLS = ["CustomizableUI"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" diff --git a/mail/components/customizableui/CustomizableWidgets.jsm b/mail/components/customizableui/CustomizableWidgets.jsm index 11e8a0d1df..c81e352c9b 100644 --- a/mail/components/customizableui/CustomizableWidgets.jsm +++ b/mail/components/customizableui/CustomizableWidgets.jsm @@ -9,8 +9,8 @@ var EXPORTED_SYMBOLS = ["CustomizableWidgets"]; const { CustomizableUI } = ChromeUtils.import( "resource:///modules/CustomizableUI.jsm" ); -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" diff --git a/mail/components/customizableui/PanelMultiView.jsm b/mail/components/customizableui/PanelMultiView.jsm index a1405326d9..ad8b4f3a20 100644 --- a/mail/components/customizableui/PanelMultiView.jsm +++ b/mail/components/customizableui/PanelMultiView.jsm @@ -101,8 +101,8 @@ var EXPORTED_SYMBOLS = ["PanelMultiView", "PanelView"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/components/customizableui/content/panelUI.js b/mail/components/customizableui/content/panelUI.js index ebf51193a6..21b1945fbf 100644 --- a/mail/components/customizableui/content/panelUI.js +++ b/mail/components/customizableui/content/panelUI.js @@ -32,8 +32,8 @@ var { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" ); var { UIDensity } = ChromeUtils.import("resource:///modules/UIDensity.jsm"); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); ChromeUtils.defineESModuleGetters(this, { diff --git a/mail/components/enterprisepolicies/content/aboutPolicies.js b/mail/components/enterprisepolicies/content/aboutPolicies.js index acd97fb36f..fb3ad8a7e6 100644 --- a/mail/components/enterprisepolicies/content/aboutPolicies.js +++ b/mail/components/enterprisepolicies/content/aboutPolicies.js @@ -4,8 +4,8 @@ "use strict"; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/components/extensions/ExtensionBrowsingData.jsm b/mail/components/extensions/ExtensionBrowsingData.jsm index 92799b1a1d..ae5284ead3 100644 --- a/mail/components/extensions/ExtensionBrowsingData.jsm +++ b/mail/components/extensions/ExtensionBrowsingData.jsm @@ -5,8 +5,8 @@ const EXPORTED_SYMBOLS = ["BrowsingDataDelegate"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/components/extensions/ExtensionPopups.jsm b/mail/components/extensions/ExtensionPopups.jsm index ee24c81946..db9889055d 100644 --- a/mail/components/extensions/ExtensionPopups.jsm +++ b/mail/components/extensions/ExtensionPopups.jsm @@ -10,8 +10,8 @@ var EXPORTED_SYMBOLS = ["BasePopup", "ViewPopup"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/components/extensions/MailExtensionShortcuts.jsm b/mail/components/extensions/MailExtensionShortcuts.jsm index fd28e3d5bf..e619f769ea 100644 --- a/mail/components/extensions/MailExtensionShortcuts.jsm +++ b/mail/components/extensions/MailExtensionShortcuts.jsm @@ -5,8 +5,8 @@ const EXPORTED_SYMBOLS = ["MailExtensionShortcuts"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const { ExtensionShortcuts } = ChromeUtils.import( "resource://gre/modules/ExtensionShortcuts.jsm" diff --git a/mail/components/extensions/parent/ext-addressBook.js b/mail/components/extensions/parent/ext-addressBook.js index cf89fbe45a..a8d5345a42 100644 --- a/mail/components/extensions/parent/ext-addressBook.js +++ b/mail/components/extensions/parent/ext-addressBook.js @@ -9,8 +9,8 @@ var { MailServices } = ChromeUtils.import( var { AddrBookDirectory } = ChromeUtils.import( "resource:///modules/AddrBookDirectory.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyGlobalGetters(this, ["fetch", "File", "FileReader"]); diff --git a/mail/components/extensions/parent/ext-compose.js b/mail/components/extensions/parent/ext-compose.js index eb375a6d1f..71736b4812 100644 --- a/mail/components/extensions/parent/ext-compose.js +++ b/mail/components/extensions/parent/ext-compose.js @@ -2,8 +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/. */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyGlobalGetters(this, ["IOUtils", "PathUtils"]); diff --git a/mail/components/extensions/parent/ext-mail.js b/mail/components/extensions/parent/ext-mail.js index ecc06d6f73..04981c387f 100644 --- a/mail/components/extensions/parent/ext-mail.js +++ b/mail/components/extensions/parent/ext-mail.js @@ -5,8 +5,8 @@ var { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { ExtensionError, getInnerWindowID } = ExtensionUtils; diff --git a/mail/components/extensions/parent/ext-mailTabs.js b/mail/components/extensions/parent/ext-mailTabs.js index 788067681c..d756941af2 100644 --- a/mail/components/extensions/parent/ext-mailTabs.js +++ b/mail/components/extensions/parent/ext-mailTabs.js @@ -2,8 +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/. */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/components/extensions/parent/ext-spacesToolbar.js b/mail/components/extensions/parent/ext-spacesToolbar.js index ce79a25ded..c5d95ff213 100644 --- a/mail/components/extensions/parent/ext-spacesToolbar.js +++ b/mail/components/extensions/parent/ext-spacesToolbar.js @@ -13,8 +13,8 @@ var { ExtensionCommon } = ChromeUtils.import( var { ExtensionParent } = ChromeUtils.import( "resource://gre/modules/ExtensionParent.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); ChromeUtils.defineModuleGetter( diff --git a/mail/components/extensions/test/xpcshell/test_ext_addressBook.js b/mail/components/extensions/test/xpcshell/test_ext_addressBook.js index 62812fe1e8..f492a0fdf7 100644 --- a/mail/components/extensions/test/xpcshell/test_ext_addressBook.js +++ b/mail/components/extensions/test/xpcshell/test_ext_addressBook.js @@ -8,8 +8,8 @@ var { ExtensionTestUtils } = ChromeUtils.import( "resource://testing-common/ExtensionXPCShellUtils.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/components/im/modules/ChatEncryption.sys.mjs b/mail/components/im/modules/ChatEncryption.sys.mjs index 1b78d1f581..4206b3397d 100644 --- a/mail/components/im/modules/ChatEncryption.sys.mjs +++ b/mail/components/im/modules/ChatEncryption.sys.mjs @@ -2,9 +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/. */ -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" -); +import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; + const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { OTRUI: "resource:///modules/OTRUI.sys.mjs", diff --git a/mail/components/im/modules/index_im.sys.mjs b/mail/components/im/modules/index_im.sys.mjs index cfa88ad028..da37d5dce4 100644 --- a/mail/components/im/modules/index_im.sys.mjs +++ b/mail/components/im/modules/index_im.sys.mjs @@ -22,10 +22,8 @@ const { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); import { FileUtils } from "resource://gre/modules/FileUtils.sys.mjs"; +import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" -); const { clearTimeout, setTimeout } = ChromeUtils.import( "resource://gre/modules/Timer.jsm" ); diff --git a/mail/components/migration/src/ThunderbirdProfileMigrator.jsm b/mail/components/migration/src/ThunderbirdProfileMigrator.jsm index d72c6e9f6e..00ed02089b 100644 --- a/mail/components/migration/src/ThunderbirdProfileMigrator.jsm +++ b/mail/components/migration/src/ThunderbirdProfileMigrator.jsm @@ -4,8 +4,8 @@ const EXPORTED_SYMBOLS = ["ThunderbirdProfileMigrator"]; -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" diff --git a/mail/components/newmailaccount/content/accountProvisioner.js b/mail/components/newmailaccount/content/accountProvisioner.js index 042dfc0f81..1c3b2ee040 100644 --- a/mail/components/newmailaccount/content/accountProvisioner.js +++ b/mail/components/newmailaccount/content/accountProvisioner.js @@ -9,8 +9,8 @@ var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/components/newmailaccount/content/uriListener.js b/mail/components/newmailaccount/content/uriListener.js index d56dbd96ac..cc4b8e7876 100644 --- a/mail/components/newmailaccount/content/uriListener.js +++ b/mail/components/newmailaccount/content/uriListener.js @@ -10,8 +10,8 @@ * one of our account providers. */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm"); var { JXON } = ChromeUtils.import("resource:///modules/JXON.jsm"); diff --git a/mail/components/preferences/general.js b/mail/components/preferences/general.js index c68656d76e..43bbcf6838 100644 --- a/mail/components/preferences/general.js +++ b/mail/components/preferences/general.js @@ -15,8 +15,8 @@ var { DownloadUtils } = ChromeUtils.import( "resource://gre/modules/DownloadUtils.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" diff --git a/mail/components/preferences/passwordManager.js b/mail/components/preferences/passwordManager.js index 5e4bd421a7..42428c5da3 100644 --- a/mail/components/preferences/passwordManager.js +++ b/mail/components/preferences/passwordManager.js @@ -9,8 +9,8 @@ var { AppConstants } = ChromeUtils.import( ); /* eslint-disable-next-line no-var */ /* eslint-disable-next-line no-var */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); ChromeUtils.defineModuleGetter( diff --git a/mail/components/preferences/preferencesTab.js b/mail/components/preferences/preferencesTab.js index c0003b5457..a7a4fb72b9 100644 --- a/mail/components/preferences/preferencesTab.js +++ b/mail/components/preferences/preferencesTab.js @@ -5,8 +5,8 @@ // mail/base/content/specialTabs.js /* globals contentTabBaseType, DOMLinkHandler */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { ExtensionParent } = ChromeUtils.import( "resource://gre/modules/ExtensionParent.jsm" diff --git a/mail/components/preferences/privacy.js b/mail/components/preferences/privacy.js index 87cbf25f3e..ebd7f41a6e 100644 --- a/mail/components/preferences/privacy.js +++ b/mail/components/preferences/privacy.js @@ -7,8 +7,8 @@ /* import-globals-from preferences.js */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); ChromeUtils.defineModuleGetter( diff --git a/mail/components/prompts/PromptCollection.jsm b/mail/components/prompts/PromptCollection.jsm index 9a96d2e9ed..95407fe719 100644 --- a/mail/components/prompts/PromptCollection.jsm +++ b/mail/components/prompts/PromptCollection.jsm @@ -6,8 +6,8 @@ var EXPORTED_SYMBOLS = ["PromptCollection"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); /** diff --git a/mail/components/test/unit/head_mailcomponents.js b/mail/components/test/unit/head_mailcomponents.js index dcc788a828..604e5e2209 100644 --- a/mail/components/test/unit/head_mailcomponents.js +++ b/mail/components/test/unit/head_mailcomponents.js @@ -1,8 +1,8 @@ var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { mailTestUtils } = ChromeUtils.import( "resource://testing-common/mailnews/MailTestUtils.jsm" diff --git a/mail/extensions/openpgp/content/BondOpenPGP.jsm b/mail/extensions/openpgp/content/BondOpenPGP.jsm index 658c46a4a9..2c531266d7 100644 --- a/mail/extensions/openpgp/content/BondOpenPGP.jsm +++ b/mail/extensions/openpgp/content/BondOpenPGP.jsm @@ -10,8 +10,8 @@ const EXPORTED_SYMBOLS = ["BondOpenPGP"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/CollectedKeysDB.jsm b/mail/extensions/openpgp/content/modules/CollectedKeysDB.jsm index 8b0ceafd08..f6955cc31b 100644 --- a/mail/extensions/openpgp/content/modules/CollectedKeysDB.jsm +++ b/mail/extensions/openpgp/content/modules/CollectedKeysDB.jsm @@ -5,8 +5,8 @@ const { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/GPGME.jsm b/mail/extensions/openpgp/content/modules/GPGME.jsm index 9483d1c1f8..c7c84c1049 100644 --- a/mail/extensions/openpgp/content/modules/GPGME.jsm +++ b/mail/extensions/openpgp/content/modules/GPGME.jsm @@ -4,8 +4,8 @@ const EXPORTED_SYMBOLS = ["GPGME"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/RNP.jsm b/mail/extensions/openpgp/content/modules/RNP.jsm index 5be3f212b1..4dcdbf98a1 100644 --- a/mail/extensions/openpgp/content/modules/RNP.jsm +++ b/mail/extensions/openpgp/content/modules/RNP.jsm @@ -7,8 +7,8 @@ const EXPORTED_SYMBOLS = ["RNP"]; const { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" ); -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/RNPLib.jsm b/mail/extensions/openpgp/content/modules/RNPLib.jsm index 850af9bd8f..67cfe932de 100644 --- a/mail/extensions/openpgp/content/modules/RNPLib.jsm +++ b/mail/extensions/openpgp/content/modules/RNPLib.jsm @@ -4,8 +4,8 @@ const EXPORTED_SYMBOLS = ["RNPLibLoader"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/armor.jsm b/mail/extensions/openpgp/content/modules/armor.jsm index 1530d71a84..81ec083747 100644 --- a/mail/extensions/openpgp/content/modules/armor.jsm +++ b/mail/extensions/openpgp/content/modules/armor.jsm @@ -8,8 +8,8 @@ var EXPORTED_SYMBOLS = ["EnigmailArmor"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/autocrypt.jsm b/mail/extensions/openpgp/content/modules/autocrypt.jsm index 8b0d4fc350..d7825c5088 100644 --- a/mail/extensions/openpgp/content/modules/autocrypt.jsm +++ b/mail/extensions/openpgp/content/modules/autocrypt.jsm @@ -11,8 +11,8 @@ var EXPORTED_SYMBOLS = ["EnigmailAutocrypt"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/core.jsm b/mail/extensions/openpgp/content/modules/core.jsm index 83fdda1bb3..d87b569b57 100644 --- a/mail/extensions/openpgp/content/modules/core.jsm +++ b/mail/extensions/openpgp/content/modules/core.jsm @@ -6,8 +6,8 @@ "use strict"; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/cryptoAPI/GnuPGCryptoAPI.jsm b/mail/extensions/openpgp/content/modules/cryptoAPI/GnuPGCryptoAPI.jsm index d0e3c84141..4380227735 100644 --- a/mail/extensions/openpgp/content/modules/cryptoAPI/GnuPGCryptoAPI.jsm +++ b/mail/extensions/openpgp/content/modules/cryptoAPI/GnuPGCryptoAPI.jsm @@ -14,8 +14,8 @@ Services.scriptloader.loadSubScript( "UTF-8" ); /* global CryptoAPI */ -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/decryption.jsm b/mail/extensions/openpgp/content/modules/decryption.jsm index 0974d133e9..ef2acc47aa 100644 --- a/mail/extensions/openpgp/content/modules/decryption.jsm +++ b/mail/extensions/openpgp/content/modules/decryption.jsm @@ -10,8 +10,8 @@ const EXPORTED_SYMBOLS = ["EnigmailDecryption"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/dialog.jsm b/mail/extensions/openpgp/content/modules/dialog.jsm index eeb4cef958..44becef19e 100644 --- a/mail/extensions/openpgp/content/modules/dialog.jsm +++ b/mail/extensions/openpgp/content/modules/dialog.jsm @@ -8,8 +8,8 @@ const EXPORTED_SYMBOLS = ["EnigmailDialog"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/encryption.jsm b/mail/extensions/openpgp/content/modules/encryption.jsm index 6f8e01ffce..9b9df8cb00 100644 --- a/mail/extensions/openpgp/content/modules/encryption.jsm +++ b/mail/extensions/openpgp/content/modules/encryption.jsm @@ -8,8 +8,8 @@ const EXPORTED_SYMBOLS = ["EnigmailEncryption"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/filters.jsm b/mail/extensions/openpgp/content/modules/filters.jsm index 39deb382ba..0330706684 100644 --- a/mail/extensions/openpgp/content/modules/filters.jsm +++ b/mail/extensions/openpgp/content/modules/filters.jsm @@ -11,8 +11,8 @@ var EXPORTED_SYMBOLS = ["EnigmailFilters"]; const { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const { EnigmailConstants } = ChromeUtils.import( "chrome://openpgp/content/modules/constants.jsm" diff --git a/mail/extensions/openpgp/content/modules/fixExchangeMsg.jsm b/mail/extensions/openpgp/content/modules/fixExchangeMsg.jsm index 835f4bc1dd..748274fda4 100644 --- a/mail/extensions/openpgp/content/modules/fixExchangeMsg.jsm +++ b/mail/extensions/openpgp/content/modules/fixExchangeMsg.jsm @@ -8,8 +8,8 @@ var EXPORTED_SYMBOLS = ["EnigmailFixExchangeMsg"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/funcs.jsm b/mail/extensions/openpgp/content/modules/funcs.jsm index e20e0f6143..e16dea76db 100644 --- a/mail/extensions/openpgp/content/modules/funcs.jsm +++ b/mail/extensions/openpgp/content/modules/funcs.jsm @@ -15,8 +15,8 @@ const EXPORTED_SYMBOLS = ["EnigmailFuncs"]; const { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/key.jsm b/mail/extensions/openpgp/content/modules/key.jsm index 5872cf61d9..749be81dd9 100644 --- a/mail/extensions/openpgp/content/modules/key.jsm +++ b/mail/extensions/openpgp/content/modules/key.jsm @@ -8,8 +8,8 @@ var EXPORTED_SYMBOLS = ["EnigmailKey"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/keyLookupHelper.jsm b/mail/extensions/openpgp/content/modules/keyLookupHelper.jsm index af50ca9020..29656de0d9 100644 --- a/mail/extensions/openpgp/content/modules/keyLookupHelper.jsm +++ b/mail/extensions/openpgp/content/modules/keyLookupHelper.jsm @@ -8,8 +8,8 @@ const EXPORTED_SYMBOLS = ["KeyLookupHelper"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/keyObj.jsm b/mail/extensions/openpgp/content/modules/keyObj.jsm index 2e64d1107b..f1d5eaf3c4 100644 --- a/mail/extensions/openpgp/content/modules/keyObj.jsm +++ b/mail/extensions/openpgp/content/modules/keyObj.jsm @@ -56,8 +56,8 @@ var EXPORTED_SYMBOLS = ["newEnigmailKeyObj"]; * getVirtualKeySize */ -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/keyRefreshService.jsm b/mail/extensions/openpgp/content/modules/keyRefreshService.jsm index c8feff4742..69b1de883b 100644 --- a/mail/extensions/openpgp/content/modules/keyRefreshService.jsm +++ b/mail/extensions/openpgp/content/modules/keyRefreshService.jsm @@ -8,8 +8,8 @@ const EXPORTED_SYMBOLS = ["EnigmailKeyRefreshService"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/keyRing.jsm b/mail/extensions/openpgp/content/modules/keyRing.jsm index b0cd922040..5cf1627f0c 100644 --- a/mail/extensions/openpgp/content/modules/keyRing.jsm +++ b/mail/extensions/openpgp/content/modules/keyRing.jsm @@ -8,8 +8,8 @@ var EXPORTED_SYMBOLS = ["EnigmailKeyRing"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/keyserver.jsm b/mail/extensions/openpgp/content/modules/keyserver.jsm index ade18eb4b3..f01f1e7901 100644 --- a/mail/extensions/openpgp/content/modules/keyserver.jsm +++ b/mail/extensions/openpgp/content/modules/keyserver.jsm @@ -8,8 +8,8 @@ const EXPORTED_SYMBOLS = ["EnigmailKeyServer"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/masterpass.jsm b/mail/extensions/openpgp/content/modules/masterpass.jsm index 01fbe654ed..e7b5b90181 100644 --- a/mail/extensions/openpgp/content/modules/masterpass.jsm +++ b/mail/extensions/openpgp/content/modules/masterpass.jsm @@ -8,8 +8,8 @@ var EXPORTED_SYMBOLS = ["OpenPGPMasterpass"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/mime.jsm b/mail/extensions/openpgp/content/modules/mime.jsm index 87cb335d36..b1c0f93483 100644 --- a/mail/extensions/openpgp/content/modules/mime.jsm +++ b/mail/extensions/openpgp/content/modules/mime.jsm @@ -8,8 +8,8 @@ var EXPORTED_SYMBOLS = ["EnigmailMime"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/mimeDecrypt.jsm b/mail/extensions/openpgp/content/modules/mimeDecrypt.jsm index 4bfa0a6a7a..fec352309e 100644 --- a/mail/extensions/openpgp/content/modules/mimeDecrypt.jsm +++ b/mail/extensions/openpgp/content/modules/mimeDecrypt.jsm @@ -11,8 +11,8 @@ const EXPORTED_SYMBOLS = ["EnigmailMimeDecrypt"]; * implemented as an XPCOM object */ -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const { EnigmailSingletons } = ChromeUtils.import( "chrome://openpgp/content/modules/singletons.jsm" diff --git a/mail/extensions/openpgp/content/modules/mimeEncrypt.jsm b/mail/extensions/openpgp/content/modules/mimeEncrypt.jsm index e481f7c1b5..4688f6b4fc 100644 --- a/mail/extensions/openpgp/content/modules/mimeEncrypt.jsm +++ b/mail/extensions/openpgp/content/modules/mimeEncrypt.jsm @@ -11,8 +11,8 @@ const EXPORTED_SYMBOLS = ["EnigmailMimeEncrypt"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/mimeVerify.jsm b/mail/extensions/openpgp/content/modules/mimeVerify.jsm index 4490d4280b..fc7d7e9804 100644 --- a/mail/extensions/openpgp/content/modules/mimeVerify.jsm +++ b/mail/extensions/openpgp/content/modules/mimeVerify.jsm @@ -10,8 +10,8 @@ const EXPORTED_SYMBOLS = ["EnigmailVerify"]; * Module for handling PGP/MIME signed messages implemented as JS module. */ -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/msgRead.jsm b/mail/extensions/openpgp/content/modules/msgRead.jsm index 38dcbf72fe..f3c9209e40 100644 --- a/mail/extensions/openpgp/content/modules/msgRead.jsm +++ b/mail/extensions/openpgp/content/modules/msgRead.jsm @@ -12,8 +12,8 @@ var EXPORTED_SYMBOLS = ["EnigmailMsgRead"]; * Message-reading related functions */ -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/persistentCrypto.jsm b/mail/extensions/openpgp/content/modules/persistentCrypto.jsm index 9346e0c478..ef1a2f653c 100644 --- a/mail/extensions/openpgp/content/modules/persistentCrypto.jsm +++ b/mail/extensions/openpgp/content/modules/persistentCrypto.jsm @@ -12,8 +12,8 @@ const { MailServices } = ChromeUtils.import( var EXPORTED_SYMBOLS = ["EnigmailPersistentCrypto"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const { MimeParser } = ChromeUtils.import("resource:///modules/mimeParser.jsm"); diff --git a/mail/extensions/openpgp/content/modules/pgpmimeHandler.jsm b/mail/extensions/openpgp/content/modules/pgpmimeHandler.jsm index acd0303934..4de2acaff5 100644 --- a/mail/extensions/openpgp/content/modules/pgpmimeHandler.jsm +++ b/mail/extensions/openpgp/content/modules/pgpmimeHandler.jsm @@ -14,8 +14,8 @@ const EXPORTED_SYMBOLS = ["EnigmailPgpmimeHander"]; const { manager: Cm } = Components; Cm.QueryInterface(Ci.nsIComponentRegistrar); -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/sqliteDb.jsm b/mail/extensions/openpgp/content/modules/sqliteDb.jsm index 8a5e49383a..3defb0ed82 100644 --- a/mail/extensions/openpgp/content/modules/sqliteDb.jsm +++ b/mail/extensions/openpgp/content/modules/sqliteDb.jsm @@ -10,8 +10,8 @@ const EXPORTED_SYMBOLS = ["PgpSqliteDb2"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/streams.jsm b/mail/extensions/openpgp/content/modules/streams.jsm index 2fd3ce8bb2..a73c4ad389 100644 --- a/mail/extensions/openpgp/content/modules/streams.jsm +++ b/mail/extensions/openpgp/content/modules/streams.jsm @@ -8,8 +8,8 @@ const EXPORTED_SYMBOLS = ["EnigmailStreams"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/webKey.jsm b/mail/extensions/openpgp/content/modules/webKey.jsm index fbc3f16671..3085f0f08f 100644 --- a/mail/extensions/openpgp/content/modules/webKey.jsm +++ b/mail/extensions/openpgp/content/modules/webKey.jsm @@ -12,8 +12,8 @@ var EXPORTED_SYMBOLS = ["EnigmailWks"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" diff --git a/mail/extensions/openpgp/content/modules/windows.jsm b/mail/extensions/openpgp/content/modules/windows.jsm index fc46c925fe..38a8f914df 100644 --- a/mail/extensions/openpgp/content/modules/windows.jsm +++ b/mail/extensions/openpgp/content/modules/windows.jsm @@ -8,8 +8,8 @@ const EXPORTED_SYMBOLS = ["EnigmailWindows"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/wkdLookup.jsm b/mail/extensions/openpgp/content/modules/wkdLookup.jsm index aa3af1074d..18e3905f79 100644 --- a/mail/extensions/openpgp/content/modules/wkdLookup.jsm +++ b/mail/extensions/openpgp/content/modules/wkdLookup.jsm @@ -11,8 +11,8 @@ var EXPORTED_SYMBOLS = ["EnigmailWkdLookup"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/modules/wksMimeHandler.jsm b/mail/extensions/openpgp/content/modules/wksMimeHandler.jsm index 0aa4302548..d531319f56 100644 --- a/mail/extensions/openpgp/content/modules/wksMimeHandler.jsm +++ b/mail/extensions/openpgp/content/modules/wksMimeHandler.jsm @@ -6,8 +6,8 @@ const EXPORTED_SYMBOLS = ["EnigmailWksMimeHandler"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/extensions/openpgp/content/ui/enigmailMessengerOverlay.js b/mail/extensions/openpgp/content/ui/enigmailMessengerOverlay.js index 5f2c5d321d..886f9e7ced 100644 --- a/mail/extensions/openpgp/content/ui/enigmailMessengerOverlay.js +++ b/mail/extensions/openpgp/content/ui/enigmailMessengerOverlay.js @@ -23,8 +23,8 @@ var { AppConstants } = ChromeUtils.import( var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/extensions/openpgp/content/ui/enigmailMsgHdrViewOverlay.js b/mail/extensions/openpgp/content/ui/enigmailMsgHdrViewOverlay.js index e35beabfa6..da9d8936e2 100644 --- a/mail/extensions/openpgp/content/ui/enigmailMsgHdrViewOverlay.js +++ b/mail/extensions/openpgp/content/ui/enigmailMsgHdrViewOverlay.js @@ -12,8 +12,8 @@ /* global gExpandedHeaderView: false, CanDetachAttachments: true, gEncryptedURIService: false, FillAttachmentListPopup: false */ /* global attachmentList: false, currentHeaderData: false */ -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/extensions/openpgp/content/ui/keyAssistant.js b/mail/extensions/openpgp/content/ui/keyAssistant.js index a16046058d..7667698825 100644 --- a/mail/extensions/openpgp/content/ui/keyAssistant.js +++ b/mail/extensions/openpgp/content/ui/keyAssistant.js @@ -10,8 +10,8 @@ "use strict"; -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); XPCOMUtils.defineLazyModuleGetters(this, { diff --git a/mail/modules/AppUpdateUI.jsm b/mail/modules/AppUpdateUI.jsm index 94245b7dbd..99f9062bd1 100644 --- a/mail/modules/AppUpdateUI.jsm +++ b/mail/modules/AppUpdateUI.jsm @@ -7,8 +7,8 @@ const EXPORTED_SYMBOLS = ["AppUpdateUI"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const { clearTimeout, setTimeout } = ChromeUtils.import( "resource://gre/modules/Timer.jsm" diff --git a/mail/modules/ExtensionsUI.jsm b/mail/modules/ExtensionsUI.jsm index 289aece24c..413b96c559 100644 --- a/mail/modules/ExtensionsUI.jsm +++ b/mail/modules/ExtensionsUI.jsm @@ -5,8 +5,8 @@ const EXPORTED_SYMBOLS = ["ExtensionsUI"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const { EventEmitter } = ChromeUtils.import( "resource://gre/modules/EventEmitter.jsm" diff --git a/mail/modules/MailMigrator.jsm b/mail/modules/MailMigrator.jsm index 656c79afbe..f9e6108b10 100644 --- a/mail/modules/MailMigrator.jsm +++ b/mail/modules/MailMigrator.jsm @@ -15,8 +15,8 @@ const { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" ); -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/modules/PhishingDetector.jsm b/mail/modules/PhishingDetector.jsm index 0dd121de20..5f92928c27 100644 --- a/mail/modules/PhishingDetector.jsm +++ b/mail/modules/PhishingDetector.jsm @@ -4,8 +4,8 @@ const EXPORTED_SYMBOLS = ["PhishingDetector"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/modules/ShortcutsManager.jsm b/mail/modules/ShortcutsManager.jsm index 6d6a63d5ca..383b27076d 100644 --- a/mail/modules/ShortcutsManager.jsm +++ b/mail/modules/ShortcutsManager.jsm @@ -14,8 +14,8 @@ const EXPORTED_SYMBOLS = ["ShortcutsManager"]; const { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm" ); -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const ShortcutsManager = { diff --git a/mail/modules/TBDistCustomizer.jsm b/mail/modules/TBDistCustomizer.jsm index d68282d89f..02d6846403 100644 --- a/mail/modules/TBDistCustomizer.jsm +++ b/mail/modules/TBDistCustomizer.jsm @@ -4,8 +4,8 @@ const EXPORTED_SYMBOLS = ["TBDistCustomizer"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var TBDistCustomizer = { diff --git a/mail/modules/UIDensity.jsm b/mail/modules/UIDensity.jsm index 59217b273a..be94ed1408 100644 --- a/mail/modules/UIDensity.jsm +++ b/mail/modules/UIDensity.jsm @@ -4,8 +4,8 @@ const EXPORTED_SYMBOLS = ["UIDensity"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var registeredWindows = new Set(); diff --git a/mail/modules/UIFontSize.jsm b/mail/modules/UIFontSize.jsm index ea6e73f02a..0e16c620b6 100644 --- a/mail/modules/UIFontSize.jsm +++ b/mail/modules/UIFontSize.jsm @@ -6,8 +6,8 @@ const EXPORTED_SYMBOLS = ["UIFontSize"]; -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var langGroup = Services.prefs.getComplexValue( diff --git a/mail/modules/WindowsJumpLists.jsm b/mail/modules/WindowsJumpLists.jsm index 506967648c..23d6bca437 100644 --- a/mail/modules/WindowsJumpLists.jsm +++ b/mail/modules/WindowsJumpLists.jsm @@ -5,8 +5,8 @@ var EXPORTED_SYMBOLS = ["WinTaskbarJumpList"]; -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); // Prefs diff --git a/mail/test/browser/notification/browser_notification.js b/mail/test/browser/notification/browser_notification.js index fa958a9ba8..8c994615dd 100644 --- a/mail/test/browser/notification/browser_notification.js +++ b/mail/test/browser/notification/browser_notification.js @@ -18,8 +18,8 @@ var { wait_for_window_close, } = ChromeUtils.import("resource://testing-common/mozmill/WindowHelpers.jsm"); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var { MailServices } = ChromeUtils.import( "resource:///modules/MailServices.jsm" diff --git a/mail/test/browser/shared-modules/OpenPGPTestUtils.jsm b/mail/test/browser/shared-modules/OpenPGPTestUtils.jsm index 17c2a0dac7..85eed069d3 100644 --- a/mail/test/browser/shared-modules/OpenPGPTestUtils.jsm +++ b/mail/test/browser/shared-modules/OpenPGPTestUtils.jsm @@ -14,8 +14,8 @@ const EventUtils = ChromeUtils.import( "resource://testing-common/mozmill/EventUtils.jsm" ); -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +const { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); const lazy = {}; diff --git a/mail/test/browser/shared-modules/PromptHelpers.jsm b/mail/test/browser/shared-modules/PromptHelpers.jsm index 3405112fa2..ac9962f679 100644 --- a/mail/test/browser/shared-modules/PromptHelpers.jsm +++ b/mail/test/browser/shared-modules/PromptHelpers.jsm @@ -14,8 +14,8 @@ var { MockObjectReplacer } = ChromeUtils.import( "resource://testing-common/mozmill/MockObjectHelpers.jsm" ); -var { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" +var { XPCOMUtils } = ChromeUtils.importESModule( + "resource://gre/modules/XPCOMUtils.sys.mjs" ); var kMockPromptServiceName = "Mock Prompt Service"; diff --git a/mail/themes/BuiltInThemes.sys.mjs b/mail/themes/BuiltInThemes.sys.mjs index 2cba7bbe6a..7330ca8c72 100644 --- a/mail/themes/BuiltInThemes.sys.mjs +++ b/mail/themes/BuiltInThemes.sys.mjs @@ -2,9 +2,7 @@ * 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/. */ -const { XPCOMUtils } = ChromeUtils.import( - "resource://gre/modules/XPCOMUtils.jsm" -); +import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; const lazy = {};