From 5f9da7b301fdad2cf17c326ed8a9bd5e604a7f28 Mon Sep 17 00:00:00 2001 From: Csoregi Natalia Date: Tue, 25 Oct 2022 23:47:58 +0300 Subject: [PATCH] Backed out 12 changesets (bug 1795322) for causing multiple failures e.g. test_deletion_request_ping.py. CLOSED TREE Backed out changeset aba25cbcda51 (bug 1795322) Backed out changeset a4a35005ada9 (bug 1795322) Backed out changeset 8e8d790eb0f4 (bug 1795322) Backed out changeset db8903454bd3 (bug 1795322) Backed out changeset 60cc71c61cad (bug 1795322) Backed out changeset bc6a674994ad (bug 1795322) Backed out changeset 6ac8a611f8c7 (bug 1795322) Backed out changeset 9fb873ecfb31 (bug 1795322) Backed out changeset c8a7a40c2a2f (bug 1795322) Backed out changeset f2c118b6c6ce (bug 1795322) Backed out changeset 38df43b4a70f (bug 1795322) Backed out changeset 89aea8373411 (bug 1795322) --- browser/app/profile/firefox.js | 6 +-- browser/base/content/browser-addons.js | 2 +- .../content/test/popupNotifications/head.js | 2 +- .../browser_preXULSkeletonUIRegistry.js | 4 +- browser/components/BrowserGlue.jsm | 4 +- .../aboutlogins/tests/browser/head.js | 2 +- .../attribution/AttributionCode.jsm | 4 +- .../components/attribution/MacAttribution.jsm | 4 +- browser/components/doh/DoHConfig.jsm | 2 +- .../enterprisepolicies/Policies.sys.mjs | 2 +- .../helpers/ProxyPolicies.sys.mjs | 2 +- .../helpers/WebsiteFilter.sys.mjs | 2 +- .../tests/marionette/test_refresh_firefox.py | 4 +- .../asrouter/docs/targeting-attributes.md | 4 +- .../components/newtab/lib/CFRPageActions.jsm | 4 +- browser/components/newtab/test/unit/utils.js | 4 +- .../tests/browser_contentblocking.js | 6 ++- browser/components/shell/ShellService.jsm | 2 +- browser/components/uitour/UITour.jsm | 3 +- .../urlbar/UrlbarProviderPlaces.sys.mjs | 2 +- .../urlbar/UrlbarProviderSearchTips.sys.mjs | 4 +- .../unit/test_quicksuggest_impressionCaps.js | 4 +- browser/modules/PermissionUI.jsm | 10 ++--- .../themes/shared/preferences/preferences.css | 2 +- .../mozscreenshots/extension/Screenshot.jsm | 3 +- .../mozscreenshots/extension/TestRunner.jsm | 2 +- .../client/performance-new/@types/gecko.d.ts | 6 +++ .../client/performance-new/@types/perf.d.ts | 2 +- .../test/browser/browser_console.js | 8 ++-- .../browser_console_consolejsm_output.js | 4 +- devtools/docs/user/browser_console/index.rst | 10 ++--- .../tutorial-breakpoint/index.rst | 4 +- .../actors/resources/console-messages.js | 2 +- devtools/server/actors/webconsole.js | 2 +- .../tests/xpcshell/test_console_filtering.js | 2 +- .../reject-globalThis-modification.rst | 4 +- docs/performance/bestpractices.md | 2 +- dom/base/ChromeUtils.cpp | 2 +- dom/base/Navigator.cpp | 2 +- dom/chrome-webidl/ChromeUtils.webidl | 3 +- dom/console/Console.cpp | 2 +- dom/docs/ipc/jsactors.rst | 3 +- dom/docs/ipc/process_model.rst | 2 +- dom/interfaces/base/nsIBrowserDOMWindow.idl | 2 +- dom/ipc/ContentParent.h | 4 +- dom/ipc/RemoteType.h | 2 +- dom/payments/PaymentRequest.cpp | 2 +- .../remoteworkers/RemoteWorkerManager.cpp | 6 +-- .../spellchecker/tests/test_bug1209414.html | 2 +- ipc/docs/processes.rst | 2 +- js/src/doc/Debugger/Tutorial-Breakpoint.md | 4 +- .../modules/geckoview/GeckoViewUtils.sys.mjs | 2 +- modules/libpref/docs/index.md | 2 +- modules/libpref/init/all.js | 2 +- mots.yaml | 2 +- .../test/codecoverage/test_lcov_rewrite.py | 12 ++--- remote/cdp/domains/content/Runtime.sys.mjs | 2 +- remote/marionette/prefs.sys.mjs | 2 +- remote/shared/Log.sys.mjs | 4 +- .../manager/ssl/RemoteSecuritySettings.jsm | 2 +- .../linux/reporter/SandboxReporter.cpp | 2 +- .../unit/test_storage_adapter_shutdown.js | 2 +- .../fxaccounts/FxAccountsPairingChannel.js | 2 +- services/fxaccounts/FxAccountsWebChannel.jsm | 2 +- services/interfaces/mozIServicesLogSink.idl | 2 +- services/settings/Utils.jsm | 3 +- services/sync/golden_gate/src/log.rs | 2 +- services/sync/modules/bridged_engine.js | 2 +- storage/mozIStorageAsyncConnection.idl | 6 +-- storage/rust/src/lib.rs | 2 +- testing/docs/mochitest-plain/faq.md | 2 +- testing/geckodriver/src/logging.rs | 8 ++-- .../client/marionette_driver/marionette.py | 12 ++--- .../tests/unit/test_crash.py | 4 +- .../tests/unit/test_navigation.py | 4 +- .../tests/unit/test_proxy.py | 4 +- .../tests/unit/test_switch_window_content.py | 4 +- .../tests/SimpleTest/MozillaLogger.js | 8 ++-- testing/xpcshell/selftest.py | 4 +- toolkit/actors/AboutHttpsOnlyErrorChild.jsm | 2 +- toolkit/actors/NetErrorChild.jsm | 2 +- .../BackgroundTasksManager.sys.mjs | 2 +- .../BackgroundTasksUtils.sys.mjs | 2 +- .../EnterprisePoliciesParent.sys.mjs | 2 +- .../WindowsGPOParser.sys.mjs | 2 +- .../macOSPoliciesParser.sys.mjs | 2 +- .../test_ext_storage_idb_data_migration.js | 2 +- .../formautofill/FormAutofillNative.cpp | 2 +- .../components/normandy/lib/LogManager.jsm | 2 +- .../passwordmgr/LoginManagerPrompter.jsm | 2 +- toolkit/components/places/Bookmarks.sys.mjs | 10 ++--- .../components/places/PlacesSyncUtils.sys.mjs | 6 +-- toolkit/components/places/PlacesUtils.sys.mjs | 16 +++---- .../places/SyncedBookmarksMirror.sys.mjs | 4 +- .../places/bookmark_sync/src/merger.rs | 2 +- toolkit/components/processtools/ProcInfo.h | 2 +- toolkit/components/satchel/FormHistory.jsm | 8 ++-- .../taskscheduler/TaskSchedulerMacOSImpl.jsm | 2 +- toolkit/components/telemetry/Events.yaml | 4 +- toolkit/components/telemetry/Histograms.json | 6 +-- toolkit/components/telemetry/Scalars.yaml | 2 +- .../telemetry/docs/internals/preferences.rst | 2 +- .../typeaheadfind/nsTypeAheadFind.cpp | 2 +- .../components/utils/JsonSchemaValidator.jsm | 2 +- toolkit/content/aboutSupport.js | 4 +- toolkit/content/widgets/findbar.js | 2 +- toolkit/modules/BrowserUtils.sys.mjs | 8 ++-- toolkit/modules/FinderHighlighter.sys.mjs | 6 +-- toolkit/modules/FinderParent.sys.mjs | 2 +- toolkit/modules/FirstStartup.sys.mjs | 2 +- toolkit/modules/Http.sys.mjs | 2 +- toolkit/modules/JSONFile.sys.mjs | 4 +- toolkit/modules/Region.sys.mjs | 4 +- .../modules/RemotePageAccessManager.sys.mjs | 2 +- toolkit/modules/Sqlite.sys.mjs | 45 +++++++++---------- toolkit/modules/docs/AsyncShutdown.rst | 4 +- toolkit/modules/nsIE10SUtils.idl | 2 +- .../tests/browser/browser_CreditCard.js | 7 +++ .../tests/browser/browser_Troubleshoot.js | 2 +- .../tests/browser/browser_web_channel.js | 4 +- .../tests/xpcshell/TestIntegration.jsm | 2 +- .../tests/xpcshell/test_DeferredTask.js | 2 +- .../tests/xpcshell/test_Integration.js | 2 +- .../tests/xpcshell/test_PromiseUtils.js | 2 +- toolkit/modules/tests/xpcshell/test_Region.js | 2 +- .../modules/tests/xpcshell/test_osKeyStore.js | 2 +- toolkit/modules/tests/xpcshell/test_sqlite.js | 2 +- .../tests/xpcshell/test_sqlite_shutdown.js | 10 ++--- toolkit/modules/tests/xpcshell/test_timer.js | 2 +- .../BackgroundTask_backgroundupdate.sys.mjs | 4 +- toolkit/mozapps/update/BackgroundUpdate.jsm | 4 +- .../update/docs/SettingUpAnUpdateServer.rst | 2 +- .../test_no_window_update_restart.py | 12 ++--- 133 files changed, 260 insertions(+), 257 deletions(-) diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index fd11f93153e2e..b2f8eca764efd 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -144,7 +144,7 @@ pref("app.update.notifyDuringDownload", false); // default value to migrate to the new location that this data is now stored // (which is in a file in the update directory). Because of this, this pref // should no longer be used directly. Instead, getAppUpdateAutoEnabled and -// getAppUpdateAutoEnabled from UpdateUtils.sys.mjs should be used. +// getAppUpdateAutoEnabled from UpdateUtils.jsm should be used. #ifndef XP_WIN pref("app.update.auto", true); #endif @@ -1649,7 +1649,7 @@ pref("browser.aboutwelcome.templateMR", true); pref("browser.messaging-system.whatsNewPanel.enabled", true); // Experiment Manager -// See Console.sys.mjs LOG_LEVELS for all possible values +// See Console.jsm LOG_LEVELS for all possible values pref("messaging-system.log", "warn"); pref("messaging-system.rsexperimentloader.enabled", true); pref("messaging-system.rsexperimentloader.collection_id", "nimbus-desktop-experiments"); @@ -1941,7 +1941,7 @@ pref("browser.contentblocking.report.show_mobile_app", true); pref("browser.send_to_device_locales", "de,en-GB,en-US,es-AR,es-CL,es-ES,es-MX,fr,id,pl,pt-BR,ru,zh-TW"); // Avoid advertising in certain regions. Comma separated string of two letter ISO 3166-1 country codes. -// We're currently blocking all of Ukraine (ua), but would prefer to block just Crimea (ua-43). Currently, the Mozilla Location Service APIs used by Region.sys.mjs only exposes the country, not the subdivision. +// We're currently blocking all of Ukraine (ua), but would prefer to block just Crimea (ua-43). Currently, the Mozilla Location Service APIs used by Region.jsm only exposes the country, not the subdivision. pref("browser.vpn_promo.disallowed_regions", "ae,by,cn,cu,iq,ir,kp,om,ru,sd,sy,tm,tr,ua"); // Default to enabling VPN promo messages to be shown when specified and allowed diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js index 8f1e93e8de392..dcb3ce0bbe0b7 100644 --- a/browser/base/content/browser-addons.js +++ b/browser/base/content/browser-addons.js @@ -1453,7 +1453,7 @@ var gUnifiedExtensions = { if (!aBrowser[attr]) { // A hacky way of setting the popup anchor outside the usual url bar // icon box, similar to how it was done for CFR. - // See: https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/PopupNotifications.sys.mjs#40 + // See: https://searchfox.org/mozilla-central/rev/847b64cc28b74b44c379f9bff4f415b97da1c6d7/toolkit/modules/PopupNotifications.jsm#42 aBrowser[attr] = aWindow.document.getElementById( anchorID // Anchor on the toolbar icon to position the popup right below the diff --git a/browser/base/content/test/popupNotifications/head.js b/browser/base/content/test/popupNotifications/head.js index 7752484664fe8..4cd21fc8b4c7f 100644 --- a/browser/base/content/test/popupNotifications/head.js +++ b/browser/base/content/test/popupNotifications/head.js @@ -11,7 +11,7 @@ ChromeUtils.defineESModuleGetters(this, { * we are sure that an attempt to display a notification will not fail. */ async function waitForWindowReadyForPopupNotifications(win) { - // These are the same checks that PopupNotifications.sys.mjs makes before it + // These are the same checks that PopupNotifications.jsm makes before it // allows a notification to open. await TestUtils.waitForCondition( () => win.gBrowser.selectedBrowser.docShellIsActive, diff --git a/browser/base/content/test/startup/browser_preXULSkeletonUIRegistry.js b/browser/base/content/test/startup/browser_preXULSkeletonUIRegistry.js index 7b96764eba483..e5d21857252ef 100644 --- a/browser/base/content/test/startup/browser_preXULSkeletonUIRegistry.js +++ b/browser/base/content/test/startup/browser_preXULSkeletonUIRegistry.js @@ -10,9 +10,9 @@ function getFirefoxExecutableFile() { return file; } -// This is copied from WindowsRegistry.sys.mjs, but extended to support +// This is copied from WindowsRegistry.jsm, but extended to support // TYPE_BINARY, as that is how we represent doubles in the registry for -// the skeleton UI. However, we didn't extend WindowsRegistry.sys.mjs itself, +// the skeleton UI. However, we didn't extend WindowsRegistry.jsm itself, // because TYPE_BINARY is kind of a footgun for javascript callers - our // use case is just trivial (checking that the value is non-zero). function readRegKeyExtended(aRoot, aPath, aKey, aRegistryNode = 0) { diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm index 04365cf6df4ce..75023f296e524 100644 --- a/browser/components/BrowserGlue.jsm +++ b/browser/components/BrowserGlue.jsm @@ -3268,7 +3268,7 @@ BrowserGlue.prototype = { false ); // Do not export. if (autoExportHTML) { - // Sqlite.sys.mjs and Places shutdown happen at profile-before-change, thus, + // Sqlite.jsm and Places shutdown happen at profile-before-change, thus, // to be on the safe side, this should run earlier. lazy.AsyncShutdown.profileChangeTeardown.addBlocker( "Places: export bookmarks.html", @@ -5150,7 +5150,7 @@ var ContentBlockingCategoriesPrefs = { * While there are some built-in permission prompts, createPermissionPrompt * can also be overridden by system add-ons or tests to provide new ones. * - * This override ability is provided by Integration.sys.mjs. See + * This override ability is provided by Integration.jsm. See * PermissionUI.jsm for an example of how to provide a new prompt * from an add-on. */ diff --git a/browser/components/aboutlogins/tests/browser/head.js b/browser/components/aboutlogins/tests/browser/head.js index 26e0403758a71..d88336ea48587 100644 --- a/browser/components/aboutlogins/tests/browser/head.js +++ b/browser/components/aboutlogins/tests/browser/head.js @@ -103,7 +103,7 @@ add_setup(async function setup_head() { } if (msg.errorMessage.includes('Unknown event: ["jsonfile", "load"')) { - // Ignore telemetry errors from JSONFile.sys.mjs. + // Ignore telemetry errors from JSONFile.jsm. return; } diff --git a/browser/components/attribution/AttributionCode.jsm b/browser/components/attribution/AttributionCode.jsm index 3bd17860b6add..06b2f810541d8 100644 --- a/browser/components/attribution/AttributionCode.jsm +++ b/browser/components/attribution/AttributionCode.jsm @@ -32,8 +32,8 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { ); let consoleOptions = { // tip: set maxLogLevel to "debug" and use lazy.log.debug() to create - // detailed messages during development. See LOG_LEVELS in Console.sys.mjs - // for details. + // detailed messages during development. See LOG_LEVELS in Console.jsm for + // details. maxLogLevel: "error", maxLogLevelPref: "browser.attribution.loglevel", prefix: "AttributionCode", diff --git a/browser/components/attribution/MacAttribution.jsm b/browser/components/attribution/MacAttribution.jsm index d7f0ae87ff9e7..e943c5e74b2b4 100644 --- a/browser/components/attribution/MacAttribution.jsm +++ b/browser/components/attribution/MacAttribution.jsm @@ -15,8 +15,8 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { ); let consoleOptions = { // tip: set maxLogLevel to "debug" and use lazy.log.debug() to create - // detailed messages during development. See LOG_LEVELS in Console.sys.mjs - // for details. + // detailed messages during development. See LOG_LEVELS in Console.jsm for + // details. maxLogLevel: "error", maxLogLevelPref: "browser.attribution.mac.loglevel", prefix: "MacAttribution", diff --git a/browser/components/doh/DoHConfig.jsm b/browser/components/doh/DoHConfig.jsm index 0a5df75b5eb5b..d6eea04ddbe09 100644 --- a/browser/components/doh/DoHConfig.jsm +++ b/browser/components/doh/DoHConfig.jsm @@ -167,7 +167,7 @@ const DoHConfigController = { // consumer use. currentConfig: makeBaseConfigObject(), - // Loads the client's region via Region.sys.mjs. This might mean waiting + // Loads the client's region via Region.jsm. This might mean waiting // until the region is available. async loadRegion() { await new Promise(resolve => { diff --git a/browser/components/enterprisepolicies/Policies.sys.mjs b/browser/components/enterprisepolicies/Policies.sys.mjs index 7e82d28651af6..21e3e8804f60b 100644 --- a/browser/components/enterprisepolicies/Policies.sys.mjs +++ b/browser/components/enterprisepolicies/Policies.sys.mjs @@ -50,7 +50,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { return new ConsoleAPI({ prefix: "Policies.jsm", // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: PREF_LOGLEVEL, }); diff --git a/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs b/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs index 8f2ba0b2a2079..f30414676d044 100644 --- a/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs +++ b/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs @@ -15,7 +15,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { return new ConsoleAPI({ prefix: "ProxyPolicies.jsm", // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: PREF_LOGLEVEL, }); diff --git a/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs b/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs index 8be0c9e20435b..0f56a6fc6f350 100644 --- a/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs +++ b/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs @@ -39,7 +39,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { return new ConsoleAPI({ prefix: "WebsiteFilter Policy", // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: PREF_LOGLEVEL, }); diff --git a/browser/components/migration/tests/marionette/test_refresh_firefox.py b/browser/components/migration/tests/marionette/test_refresh_firefox.py index 8931ce15447b5..7dc2ca169c27b 100644 --- a/browser/components/migration/tests/marionette/test_refresh_firefox.py +++ b/browser/components/migration/tests/marionette/test_refresh_firefox.py @@ -534,8 +534,8 @@ def setUpScriptData(self): window.global = {}; global.LoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1", "nsILoginInfo", "init"); global.profSvc = Cc["@mozilla.org/toolkit/profile-service;1"].getService(Ci.nsIToolkitProfileService); - global.Preferences = ChromeUtils.importESModules( - "resource://gre/modules/Preferences.sys.mjs" + global.Preferences = ChromeUtils.import( + "resource://gre/modules/Preferences.jsm" ).Preferences; global.FormHistory = ChromeUtils.import( "resource://gre/modules/FormHistory.jsm" diff --git a/browser/components/newtab/content-src/asrouter/docs/targeting-attributes.md b/browser/components/newtab/content-src/asrouter/docs/targeting-attributes.md index 46b7190d93185..c13b36f7494ce 100644 --- a/browser/components/newtab/content-src/asrouter/docs/targeting-attributes.md +++ b/browser/components/newtab/content-src/asrouter/docs/targeting-attributes.md @@ -527,7 +527,7 @@ declare const totalBlockedCount: number; ### `recentBookmarks` -An array of GUIDs of recent bookmarks as provided by [`NewTabUtils.getRecentBookmarks`](https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/NewTabUtils.sys.mjs#1059) +An array of GUIDs of recent bookmarks as provided by [`NewTabUtils.getRecentBookmarks`](https://searchfox.org/mozilla-central/rev/e0b0c38ee83f99d3cf868bad525ace4a395039f1/toolkit/modules/NewTabUtils.jsm#1087) #### Definition @@ -589,7 +589,7 @@ declare const attachedFxAOAuthClients: Promise ### `platformName` -[Platform information](https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/AppConstants.sys.mjs#153). +[Platform information](https://searchfox.org/mozilla-central/rev/05a22d864814cb1e4352faa4004e1f975c7d2eb9/toolkit/modules/AppConstants.jsm#156). #### Definition diff --git a/browser/components/newtab/lib/CFRPageActions.jsm b/browser/components/newtab/lib/CFRPageActions.jsm index 445ebcdb499ff..52323f79e3363 100644 --- a/browser/components/newtab/lib/CFRPageActions.jsm +++ b/browser/components/newtab/lib/CFRPageActions.jsm @@ -806,7 +806,7 @@ class PageAction { const { content } = message; // A hacky way of setting the popup anchor outside the usual url bar icon box - // See https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/PopupNotifications.sys.mjs#40 + // See https://searchfox.org/mozilla-central/rev/847b64cc28b74b44c379f9bff4f415b97da1c6d7/toolkit/modules/PopupNotifications.jsm#42 browser.cfrpopupnotificationanchor = this.window.document.getElementById(content.anchor_id) || this.container; @@ -819,7 +819,7 @@ class PageAction { const { content } = message; // A hacky way of setting the popup anchor outside the usual url bar icon box - // See https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/PopupNotifications.sys.mjs#40 + // See https://searchfox.org/mozilla-central/rev/847b64cc28b74b44c379f9bff4f415b97da1c6d7/toolkit/modules/PopupNotifications.jsm#42 browser.cfrpopupnotificationanchor = this.window.document.getElementById(content.anchor_id) || this.container; diff --git a/browser/components/newtab/test/unit/utils.js b/browser/components/newtab/test/unit/utils.js index 793822dbdb8eb..ab0161448cdda 100644 --- a/browser/components/newtab/test/unit/utils.js +++ b/browser/components/newtab/test/unit/utils.js @@ -116,7 +116,7 @@ export class FakensIPrefBranch { FakensIPrefBranch.prototype.prefs = {}; /** - * Very simple fake for the most basic semantics of Preferences.sys.mjs. + * Very simple fake for the most basic semantics of Preferences.jsm. * Extends FakensIPrefBranch. */ export class FakePrefs extends FakensIPrefBranch { @@ -136,7 +136,7 @@ export class FakePrefs extends FakensIPrefBranch { } /** - * Slimmed down version of toolkit/modules/EventEmitter.sys.mjs + * Slimmed down version of toolkit/modules/EventEmitter.jsm */ export function EventEmitter() {} EventEmitter.decorate = function(objectToDecorate) { diff --git a/browser/components/preferences/tests/browser_contentblocking.js b/browser/components/preferences/tests/browser_contentblocking.js index 3604b7e54dba5..4cedb3b9cf41c 100644 --- a/browser/components/preferences/tests/browser_contentblocking.js +++ b/browser/components/preferences/tests/browser_contentblocking.js @@ -1,7 +1,9 @@ /* eslint-env webextensions */ -const { Preferences } = ChromeUtils.importESModule( - "resource://gre/modules/Preferences.sys.mjs" +ChromeUtils.defineModuleGetter( + this, + "Preferences", + "resource://gre/modules/Preferences.jsm" ); const TP_PREF = "privacy.trackingprotection.enabled"; diff --git a/browser/components/shell/ShellService.jsm b/browser/components/shell/ShellService.jsm index 5bd7536234efa..37b803ba89514 100644 --- a/browser/components/shell/ShellService.jsm +++ b/browser/components/shell/ShellService.jsm @@ -37,7 +37,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { ); let consoleOptions = { // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "debug", maxLogLevelPref: "browser.shell.loglevel", prefix: "ShellService", diff --git a/browser/components/uitour/UITour.jsm b/browser/components/uitour/UITour.jsm index ca09edfeb00ee..80d7ddd5b71b5 100644 --- a/browser/components/uitour/UITour.jsm +++ b/browser/components/uitour/UITour.jsm @@ -36,8 +36,7 @@ XPCOMUtils.defineLazyGetter(lazy, "fxAccounts", () => { ).getFxAccountsSingleton(); }); -// See LOG_LEVELS in Console.sys.mjs. Common examples: "All", "Info", "Warn", & -// "Error". +// See LOG_LEVELS in Console.jsm. Common examples: "All", "Info", "Warn", & "Error". const PREF_LOG_LEVEL = "browser.uitour.loglevel"; const BACKGROUND_PAGE_ACTIONS_ALLOWED = new Set([ diff --git a/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs b/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs index f6704fc13f809..550e441d6b656 100644 --- a/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs +++ b/browser/components/urlbar/UrlbarProviderPlaces.sys.mjs @@ -1425,7 +1425,7 @@ class ProviderPlaces extends UrlbarProvider { * Gets a Sqlite database handle. * * @returns {Promise} - * A connection to the Sqlite database handle (according to {@link Sqlite.sys.mjs}). + * A connection to the Sqlite database handle (according to {@link Sqlite.jsm}). * @throws A javascript exception */ getDatabaseHandle() { diff --git a/browser/components/urlbar/UrlbarProviderSearchTips.sys.mjs b/browser/components/urlbar/UrlbarProviderSearchTips.sys.mjs index 8afd4d4b96f26..2fb25d983e8cf 100644 --- a/browser/components/urlbar/UrlbarProviderSearchTips.sys.mjs +++ b/browser/components/urlbar/UrlbarProviderSearchTips.sys.mjs @@ -302,8 +302,8 @@ class ProviderSearchTips extends UrlbarProvider { } // Second, wait 500ms. ts_paint waits at most 500ms after MozAfterPaint - // before ending. We use XPCOM directly instead of Timer.sys.mjs to avoid the - // perf impact of loading Timer.sys.mjs, in case it's not already loaded. + // before ending. We use XPCOM directly instead of Timer.jsm to avoid the + // perf impact of loading Timer.jsm, in case it's not already loaded. await new Promise(resolve => { let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); timer.initWithCallback(resolve, 500, Ci.nsITimer.TYPE_ONE_SHOT); diff --git a/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_impressionCaps.js b/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_impressionCaps.js index c30b0e924771c..72d92b2917b44 100644 --- a/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_impressionCaps.js +++ b/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_impressionCaps.js @@ -3808,8 +3808,8 @@ async function doTimedCallbacks(callbacksBySecond) { // timeout internal to macOS is being hit. This problem does not seem to happen // when running the full browser, only during xpcshell tests. In fact the // problem can be reproduced in an xpcshell test that simply creates an interval -// timer whose period is 1s (e.g., using `setInterval()` from Timer.sys.mjs). -// After ~33 ticks, the timer's period jumps to ~10s. +// timer whose period is 1s (e.g., using `setInterval()` from Timer.jsm). After +// ~33 ticks, the timer's period jumps to ~10s. async function doTimedCallbacks(callbacksBySecond) { await Promise.all( Object.entries(callbacksBySecond).map( diff --git a/browser/modules/PermissionUI.jsm b/browser/modules/PermissionUI.jsm index 4cd18368e0627..2716721466987 100644 --- a/browser/modules/PermissionUI.jsm +++ b/browser/modules/PermissionUI.jsm @@ -20,8 +20,8 @@ var EXPORTED_SYMBOLS = ["PermissionUI"]; * permission request is coming up from content by way of the * nsContentPermissionHelper. The system add-on could then do the following: * - * const { Integration } = ChromeUtils.importESModule( - * "resource://gre/modules/Integration.sys.mjs" + * const { Integration } = ChromeUtils.import( + * "resource://gre/modules/Integration.jsm" * ); * const { PermissionUI } = ChromeUtils.import( * "resource:///modules/PermissionUI.jsm" @@ -188,7 +188,7 @@ var PermissionPromptPrototype = { /** * These are the options that will be passed to the PopupNotification when it * is shown. See the documentation of `PopupNotifications_show` in - * PopupNotifications.sys.mjs for details. + * PopupNotifications.jsm for details. * * Note that prompt() will automatically set displayURI to * be the URI of the requesting pricipal, unless the displayURI is exactly @@ -229,7 +229,7 @@ var PermissionPromptPrototype = { * then you need to make sure its ID has the "-notification" suffix, * and then return the prefix here. * - * See PopupNotifications.sys.mjs for more details. + * See PopupNotifications.jsm for more details. * * @return {string} * The unique ID that will be used to as the @@ -251,7 +251,7 @@ var PermissionPromptPrototype = { /** * The message to show to the user in the PopupNotification, see - * `PopupNotifications_show` in PopupNotifications.sys.mjs. + * `PopupNotifications_show` in PopupNotifications.jsm. * * Subclasses must override this. * diff --git a/browser/themes/shared/preferences/preferences.css b/browser/themes/shared/preferences/preferences.css index cb84ab905e6b4..5a996b291829f 100644 --- a/browser/themes/shared/preferences/preferences.css +++ b/browser/themes/shared/preferences/preferences.css @@ -287,7 +287,7 @@ checkbox { #FontsDialog menulist:empty { /* When there's no menupopup, while the font builder is running, * the height of the menulist would otherwise shrink. This throws - * off the height determination SubDialog.sys.mjs does, which then + * off the height determination SubDialog.jsm does, which then * leads to content being cut off. Fix by enforcing a minimum height * when there's no content: */ min-height: max(32px, calc(1.4em + 16px)); diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm index 155f2741bcf3c..2fbf8e5477610 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/Screenshot.jsm @@ -14,8 +14,7 @@ const { XPCOMUtils } = ChromeUtils.importESModule( ); // Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref. -// See LOG_LEVELS in Console.sys.mjs. Common examples: "All", "Info", "Warn", & -// "Error". +// See LOG_LEVELS in Console.jsm. Common examples: "All", "Info", "Warn", & "Error". const PREF_LOG_LEVEL = "extensions.mozscreenshots@mozilla.org.loglevel"; const lazy = {}; XPCOMUtils.defineLazyGetter(lazy, "log", () => { diff --git a/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm b/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm index 9aab966f6b93e..5751d686dd8b2 100644 --- a/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm +++ b/browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm @@ -263,7 +263,7 @@ var TestRunner = { * Calculate the bounding box based on CSS selector from config for cropping * * @param {String[]} selectors - array of CSS selectors for relevant DOM element - * @return {Geometry.sys.mjs Rect} Rect holding relevant x, y, width, height with padding + * @return {Geometry.jsm Rect} Rect holding relevant x, y, width, height with padding **/ _findBoundingBox(selectors, windowType) { if (!selectors.length) { diff --git a/devtools/client/performance-new/@types/gecko.d.ts b/devtools/client/performance-new/@types/gecko.d.ts index 666b3165fa326..63029116e8937 100644 --- a/devtools/client/performance-new/@types/gecko.d.ts +++ b/devtools/client/performance-new/@types/gecko.d.ts @@ -216,6 +216,8 @@ declare namespace MockedExports { principal: PrincipalStub; } + const WebChannelJSM: any; + // TS-TODO const CustomizableUIJSM: any; const CustomizableWidgetsJSM: any; @@ -336,6 +338,10 @@ declare module "resource://gre/modules/AppConstants.sys.mjs" { export = MockedExports.AppConstantsSYSMJS; } +declare module "resource://gre/modules/WebChannel.jsm" { + export = MockedExports.WebChannelJSM; +} + declare module "resource://devtools/client/performance-new/popup/background.jsm.js" { import * as Background from "devtools/client/performance-new/popup/background.jsm.js"; export = Background; diff --git a/devtools/client/performance-new/@types/perf.d.ts b/devtools/client/performance-new/@types/perf.d.ts index 9179dc5a04a82..b35af63d33922 100644 --- a/devtools/client/performance-new/@types/perf.d.ts +++ b/devtools/client/performance-new/@types/perf.d.ts @@ -548,7 +548,7 @@ type QuerySymbolicationApiResponse = string; /** * This represents an event channel that can talk to a content page on the web. - * This interface is a manually typed version of toolkit/modules/WebChannel.sys.mjs + * This interface is a manually typed version of toolkit/modules/WebChannel.jsm * and is opinionated about the types of messages we can send with it. * * The definition is here rather than gecko.d.ts because it was simpler than getting diff --git a/devtools/client/webconsole/test/browser/browser_console.js b/devtools/client/webconsole/test/browser/browser_console.js index a2dec355123ee..d5ddc4721a2df 100644 --- a/devtools/client/webconsole/test/browser/browser_console.js +++ b/devtools/client/webconsole/test/browser/browser_console.js @@ -52,7 +52,7 @@ async function testMessages() { ok(!hud, "browser console is not open"); // The test harness does override the global's console property to replace it with - // a Console.sys.mjs instance (https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/testing/mochitest/api.js#75-78) + // a Console.jsm instance (https://searchfox.org/mozilla-central/rev/618f9970972adc5a21194d39d690ec0865f26024/testing/mochitest/api.js#75-80) // So here we reset the console property with the native console (which is luckily // stored in `nativeConsole`). const overriddenConsole = globalThis.console; @@ -185,7 +185,7 @@ async function testMessages() { ); Services.console.logMessage(scriptErrorMessage); - // Check messages logged in content with Log.sys.mjs + // Check messages logged in content with Log.jsm await SpecialPowers.spawn(gBrowser.selectedBrowser, [], () => { const { Log } = ChromeUtils.importESModule( "resource://gre/modules/Log.sys.mjs" @@ -193,7 +193,7 @@ async function testMessages() { const logger = Log.repository.getLogger("TEST_LOGGER_" + Date.now()); logger.addAppender(new Log.ConsoleAppender(new Log.BasicFormatter())); logger.level = Log.Level.Info; - logger.info("Log.sys.mjs content process messsage"); + logger.info("Log.jsm content process messsage"); }); // Check CSS warnings in parent process @@ -241,7 +241,7 @@ async function testMessages() { await checkUniqueMessageExists(hud, "test-image.png", ".network"); await checkUniqueMessageExists( hud, - "Log.sys.mjs content process messsage", + "Log.jsm content process messsage", ".console-api" ); await checkUniqueMessageExists( diff --git a/devtools/client/webconsole/test/browser/browser_console_consolejsm_output.js b/devtools/client/webconsole/test/browser/browser_console_consolejsm_output.js index e80aac6b83918..fc276fb8efa42 100644 --- a/devtools/client/webconsole/test/browser/browser_console_consolejsm_output.js +++ b/devtools/client/webconsole/test/browser/browser_console_consolejsm_output.js @@ -1,7 +1,7 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ -// Test that Console.sys.mjs outputs messages to the Browser Console. +// Test that Console.jsm outputs messages to the Browser Console. "use strict"; @@ -37,7 +37,7 @@ add_task(async function testCategoryLogs() { testTrace(); console.timeEnd("foobarTimer"); - info("wait for the Console.sys.mjs messages"); + info("wait for the Console.jsm messages"); await checkMessageExists(hud, "bug851231-log"); await checkMessageExists(hud, "bug851231-info"); diff --git a/devtools/docs/user/browser_console/index.rst b/devtools/docs/user/browser_console/index.rst index ae9d132a86970..e15e7bac9aa72 100644 --- a/devtools/docs/user/browser_console/index.rst +++ b/devtools/docs/user/browser_console/index.rst @@ -73,22 +73,22 @@ Messages from add-ons The Browser Console displays messages logged by all Firefox add-ons. -Console.sys.mjs -~~~~~~~~~~~~~~~ +Console.jsm +~~~~~~~~~~~ To use the console API from a traditional or bootstrapped add-on, get it from the Console module. -One exported symbol from ``Console.sys.mjs`` is ``console``. Below is an example of how to access it, which adds a message to the Browser Console. +One exported symbol from ``Console.jsm`` is ``console``. Below is an example of how to access it, which adds a message to the Browser Console. .. code-block:: JavaScript - const { console } = ChromeUtils.importESModule("resource://gre/modules/Console.sys.mjs"); + const { console } = ChromeUtils.import("resource://gre/modules/Console.jsm"); console.log("Hello from Firefox code"); //output messages to the console Learn more: - `Console API reference `_ -- :searchfox:`Console.sys.mjs source code ` +- `Console.jsm source code in the Mozilla DXR `_ Browser Console command line diff --git a/devtools/docs/user/debugger-api/tutorial-breakpoint/index.rst b/devtools/docs/user/debugger-api/tutorial-breakpoint/index.rst index 188d6d3056278..fb56b14a3f241 100644 --- a/devtools/docs/user/debugger-api/tutorial-breakpoint/index.rst +++ b/devtools/docs/user/debugger-api/tutorial-breakpoint/index.rst @@ -43,8 +43,8 @@ This tutorial was tested against Firefox 58 Beta and Nightly. It does not work i const { addDebuggerToGlobal } = ChromeUtils.importESModule( "resource://gre/modules/jsdebugger.sys.mjs" ); - const { console } = ChromeUtils.importESModule( - "resource://gre/modules/Console.sys.mjs" + const { console } = ChromeUtils.import( + "resource://gre/modules/Console.jsm" ); // This defines 'Debugger' in this Scratchpad; diff --git a/devtools/server/actors/resources/console-messages.js b/devtools/server/actors/resources/console-messages.js index 8ad97b366cd0e..0f56ce08406ba 100644 --- a/devtools/server/actors/resources/console-messages.js +++ b/devtools/server/actors/resources/console-messages.js @@ -216,7 +216,7 @@ function prepareConsoleMessageForRemote(targetActor, message) { filename: message.filename, level: message.level, lineNumber: message.lineNumber, - // messages emitted from Console.sys.mjs don't have a microSecondTimeStamp property + // messages emitted from Console.jsm don't have a microSecondTimeStamp property timeStamp: message.microSecondTimeStamp ? message.microSecondTimeStamp / 1000 : message.timeStamp, diff --git a/devtools/server/actors/webconsole.js b/devtools/server/actors/webconsole.js index be169eed818a1..e7ae103f1d5f4 100644 --- a/devtools/server/actors/webconsole.js +++ b/devtools/server/actors/webconsole.js @@ -2078,7 +2078,7 @@ const WebConsoleActor = ActorClassWithSpec(webconsoleSpec, { filename: message.filename, level: message.level, lineNumber: message.lineNumber, - // messages emitted from Console.sys.mjs don't have a microSecondTimeStamp property + // messages emitted from Console.jsm don't have a microSecondTimeStamp property timeStamp: message.microSecondTimeStamp ? message.microSecondTimeStamp / 1000 : message.timeStamp, diff --git a/devtools/shared/tests/xpcshell/test_console_filtering.js b/devtools/shared/tests/xpcshell/test_console_filtering.js index ff2e05b30da7d..9285ccd3daa15 100644 --- a/devtools/shared/tests/xpcshell/test_console_filtering.js +++ b/devtools/shared/tests/xpcshell/test_console_filtering.js @@ -70,7 +70,7 @@ function createFakeAddonWindow({ addonId } = {}) { * through to console messages. */ function run_test() { - // console1 Test Console.sys.mjs messages tagged by the Addon SDK + // console1 Test Console.jsm messages tagged by the Addon SDK // are still filtered correctly. const console1 = new ConsoleAPI({ consoleID: "addon/foo", diff --git a/docs/code-quality/lint/linters/eslint-plugin-mozilla/reject-globalThis-modification.rst b/docs/code-quality/lint/linters/eslint-plugin-mozilla/reject-globalThis-modification.rst index dd4fc4b2afd3d..6d8a11d18e2b1 100644 --- a/docs/code-quality/lint/linters/eslint-plugin-mozilla/reject-globalThis-modification.rst +++ b/docs/code-quality/lint/linters/eslint-plugin-mozilla/reject-globalThis-modification.rst @@ -14,6 +14,6 @@ Examples of incorrect code for this rule: globalThis.foo = 10; Object.defineProperty(globalThis, "bar", { value: 20}); - ChromeUtils.defineESModuleGetters(globalThis, { - AppConstants: "resource://gre/modules/AppConstants.sys.mjs", + XPCOMUtils.defineLazyModuleGetters(globalThis, { + AppConstants: "resource://gre/modules/AppConstants.jsm", }); diff --git a/docs/performance/bestpractices.md b/docs/performance/bestpractices.md index 5ce2f336e5e42..a64bc7d8b766b 100644 --- a/docs/performance/bestpractices.md +++ b/docs/performance/bestpractices.md @@ -550,7 +550,7 @@ more](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structure without having to do conversions for JSON compatibility. A Promise-based wrapper for IndexedDB, -[IndexedDB.sys.mjs](http://searchfox.org/mozilla-central/source/toolkit/modules/IndexedDB.sys.mjs) +[IndexedDB.jsm](http://searchfox.org/mozilla-central/source/toolkit/modules/IndexedDB.jsm) is available for chrome code. ## Test on weak hardware diff --git a/dom/base/ChromeUtils.cpp b/dom/base/ChromeUtils.cpp index 332152bb951df..ec41249ba62d7 100644 --- a/dom/base/ChromeUtils.cpp +++ b/dom/base/ChromeUtils.cpp @@ -1015,7 +1015,7 @@ static WebIDLProcType ProcTypeToWebIDL(mozilla::ProcType aType) { "In order for this static cast to be okay, " "WebIDLProcType must match ProcType exactly"); - // These must match the similar ones in E10SUtils.sys.mjs, RemoteTypes.h, + // These must match the similar ones in E10SUtils.jsm, RemoteTypes.h, // ProcInfo.h and ChromeUtils.webidl switch (aType) { PROCTYPE_TO_WEBIDL_CASE(Web, Web); diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index e9b8f61d65b67..e432d25c7397b 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -877,7 +877,7 @@ uint32_t Navigator::MaxTouchPoints(CallerType aCallerType) { // This list should be kept up-to-date with the spec: // https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers -// If you change this list, please also update the copy in E10SUtils.sys.mjs. +// If you change this list, please also update the copy in E10SUtils.jsm. static const char* const kSafeSchemes[] = { // clang-format off "bitcoin", diff --git a/dom/chrome-webidl/ChromeUtils.webidl b/dom/chrome-webidl/ChromeUtils.webidl index 323dbdb1a7579..33c2c7ee774b5 100644 --- a/dom/chrome-webidl/ChromeUtils.webidl +++ b/dom/chrome-webidl/ChromeUtils.webidl @@ -648,8 +648,7 @@ partial namespace ChromeUtils { /* * This type is a WebIDL representation of mozilla::ProcType. - * These must match the similar ones in E10SUtils.sys.mjs, RemoteTypes.h, - * ProcInfo.h and ChromeUtils.cpp + * These must match the similar ones in E10SUtils.jsm, RemoteTypes.h, ProcInfo.h and ChromeUtils.cpp */ enum WebIDLProcType { "web", diff --git a/dom/console/Console.cpp b/dom/console/Console.cpp index 9ae139a78e8e1..6b3e14fa92ea3 100644 --- a/dom/console/Console.cpp +++ b/dom/console/Console.cpp @@ -195,7 +195,7 @@ class ConsoleCallData final { // when the object is created from a SharedWorker, a ServiceWorker or a // subworker of a ChromeWorker these IDs are the type of worker and the // filename of the callee. - // In Console.sys.mjs the ID is 'jsm'. + // In Console.jsm the ID is 'jsm'. enum { eString, eNumber, eUnknown } mIDType; uint64_t mOuterIDNumber; diff --git a/dom/docs/ipc/jsactors.rst b/dom/docs/ipc/jsactors.rst index 95f8493250503..04f372ff23f75 100644 --- a/dom/docs/ipc/jsactors.rst +++ b/dom/docs/ipc/jsactors.rst @@ -303,7 +303,7 @@ Despite being outlawed as a way of synchronously accessing the properties of obj CPOW messages, however, cannot be sent over the JSWindowActor communications pipe, so this handy mechanism will no longer work. -Instead, a new module called :searchfox:`ContentDOMReference.sys.mjs ` has been created which supplies the same capability. See that file for documentation. +Instead, a new module called `ContentDOMReference.jsm`_ has been created which supplies the same capability. See that file for documentation. How to start porting parent-process browser code to use JSWindowActors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -542,6 +542,7 @@ And more .. _Electrolysis Project: https://wiki.mozilla.org/Electrolysis .. _IPC Actors: https://developer.mozilla.org/en-US/docs/Mozilla/IPDL/Tutorial .. _Context Menu Fission Port: https://hg.mozilla.org/mozilla-central/rev/adc60720b7b8 +.. _ContentDOMReference.jsm: https://searchfox.org/mozilla-central/source/toolkit/modules/ContentDOMReference.jsm .. _JSProcessActor.webidl: https://searchfox.org/mozilla-central/source/dom/chrome-webidl/JSWindowActor.webidl .. _JSWindowActor.webidl: https://searchfox.org/mozilla-central/source/dom/chrome-webidl/JSWindowActor.webidl .. _BrowserElementParent.jsm: https://searchfox.org/mozilla-central/rev/ec806131cb7bcd1c26c254d25cd5ab8a61b2aeb6/toolkit/actors/BrowserElementParent.jsm diff --git a/dom/docs/ipc/process_model.rst b/dom/docs/ipc/process_model.rst index 34b2227ed546b..d07595a730db9 100644 --- a/dom/docs/ipc/process_model.rst +++ b/dom/docs/ipc/process_model.rst @@ -98,7 +98,7 @@ Content Process Content processes are used to load web content, and are the only process type (other than the parent process) which can load and execute JS code. These processes are further subdivided into specific "remote types", which specify the type of content loaded within them, their sandboxing behavior, and can gate access to certain privileged IPC methods. -The specific remote type and isolation behaviour used for a specific resource is currently controlled in 2 major places. When performing a document navigation, the final process to load the document in is selected by the logic in `ProcessIsolation.cpp `_. This will combine information about the specific response, such as the site and headers, with other state to select which process and other isolating actions should be taken. When selecting which process to create the initial process for a new tab in, and when selecting processes for serviceworkers and shared workers, the logic in :searchfox:`E10SUtils.sys.mjs `_ is used to select a process. The logic in ``E10SUtils.sys.mjs`` will likely be removed and replaced with ``ProcessIsolation.cpp`` in the future. +The specific remote type and isolation behaviour used for a specific resource is currently controlled in 2 major places. When performing a document navigation, the final process to load the document in is selected by the logic in `ProcessIsolation.cpp `_. This will combine information about the specific response, such as the site and headers, with other state to select which process and other isolating actions should be taken. When selecting which process to create the initial process for a new tab in, and when selecting processes for serviceworkers and shared workers, the logic in `E10SUtils.jsm `_ is used to select a process. The logic in ``E10SUtils.jsm`` will likely be removed and replaced with ``ProcessIsolation.cpp`` in the future. .. note:: diff --git a/dom/interfaces/base/nsIBrowserDOMWindow.idl b/dom/interfaces/base/nsIBrowserDOMWindow.idl index 9add5bb3d27d5..45143d624eeb3 100644 --- a/dom/interfaces/base/nsIBrowserDOMWindow.idl +++ b/dom/interfaces/base/nsIBrowserDOMWindow.idl @@ -174,7 +174,7 @@ interface nsIBrowserDOMWindow : nsISupports * This function is responsible for calling * nsIContentViewer::PermitUnload on each frame in the window. It * returns true if closing the window is allowed. See canClose() in - * BrowserUtils.sys.mjs for a simple implementation of this method. + * BrowserUtils.jsm for a simple implementation of this method. */ boolean canClose(); diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 0ecd12d1b2c23..46213434a0f6b 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -1655,11 +1655,11 @@ class ContentParent final : public PContentParent, NS_DEFINE_STATIC_IID_ACCESSOR(ContentParent, NS_CONTENTPARENT_IID) -// This is the C++ version of remoteTypePrefix in E10SUtils.sys.mjs. +// This is the C++ version of remoteTypePrefix in E10SUtils.jsm. const nsDependentCSubstring RemoteTypePrefix( const nsACString& aContentProcessType); -// This is based on isWebRemoteType in E10SUtils.sys.mjs. +// This is based on isWebRemoteType in E10SUtils.jsm. bool IsWebRemoteType(const nsACString& aContentProcessType); bool IsWebCoopCoepRemoteType(const nsACString& aContentProcessType); diff --git a/dom/ipc/RemoteType.h b/dom/ipc/RemoteType.h index 43183c7deeee1..0067f19baade4 100644 --- a/dom/ipc/RemoteType.h +++ b/dom/ipc/RemoteType.h @@ -10,7 +10,7 @@ #include "nsString.h" #include "nsReadableUtils.h" -// These must match the similar ones in E10SUtils.sys.mjs and ProcInfo.h and +// These must match the similar ones in E10SUtils.jsm and ProcInfo.h and // ChromeUtils.webidl Process names as reported by about:memory are defined in // ContentChild:RecvRemoteType. Add your value there too or it will be called // "Web Content". diff --git a/dom/payments/PaymentRequest.cpp b/dom/payments/PaymentRequest.cpp index 00f6345f0b371..9206e7e43e8d4 100644 --- a/dom/payments/PaymentRequest.cpp +++ b/dom/payments/PaymentRequest.cpp @@ -83,7 +83,7 @@ bool PaymentRequest::PrefEnabled(JSContext* aCx, JSObject* aObj) { MOZ_ASSERT(manager); nsCOMPtr regionJsm = - do_ImportESModule("resource://gre/modules/Region.sys.mjs", "Region"); + do_ImportModule("resource://gre/modules/Region.jsm", "Region"); nsAutoString region; nsresult rv = regionJsm->GetHome(region); if (NS_FAILED(rv)) { diff --git a/dom/workers/remoteworkers/RemoteWorkerManager.cpp b/dom/workers/remoteworkers/RemoteWorkerManager.cpp index dec4a51db7ac6..d9c266f68313b 100644 --- a/dom/workers/remoteworkers/RemoteWorkerManager.cpp +++ b/dom/workers/remoteworkers/RemoteWorkerManager.cpp @@ -109,8 +109,8 @@ Result RemoteWorkerManager::GetRemoteType( MOZ_ASSERT_IF(aWorkerKind == WorkerKind::WorkerKindService, aPrincipal->GetIsContentPrincipal()); - nsCOMPtr e10sUtils = do_ImportESModule( - "resource://gre/modules/E10SUtils.sys.mjs", "E10SUtils", fallible); + nsCOMPtr e10sUtils = do_ImportModule( + "resource://gre/modules/E10SUtils.jsm", "E10SUtils", fallible); if (NS_WARN_IF(!e10sUtils)) { LOG(("GetRemoteType Abort: could not import E10SUtils")); return Err(NS_ERROR_DOM_ABORT_ERR); @@ -197,7 +197,7 @@ Result RemoteWorkerManager::GetRemoteType( if (rv == NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS) { // When the failure is a Javascript Error, the line number retrieved - // from the Exception instance isn't going to be the E10SUtils.sys.mjs + // from the Exception instance isn't going to be the E10SUtils.jsm // line that originated the failure, and so we fallback to retrieve it // from the nsIScriptError. nsCOMPtr scriptError = diff --git a/editor/spellchecker/tests/test_bug1209414.html b/editor/spellchecker/tests/test_bug1209414.html index b4b0cae947a53..22f31b957d6ed 100644 --- a/editor/spellchecker/tests/test_bug1209414.html +++ b/editor/spellchecker/tests/test_bug1209414.html @@ -71,7 +71,7 @@ var state = contextMenu.state; // Select Language from the menu. Take a look at - // toolkit/modules/InlineSpellChecker.sys.mjs to see how the menu works. + // toolkit/modules/InlineSpellChecker.jsm to see how the menu works. contextMenu.ownerDocument.getElementById("spell-check-dictionary-en-US") .doCommand(); contextMenu.hidePopup(); diff --git a/ipc/docs/processes.rst b/ipc/docs/processes.rst index 45f00fe1449b1..afa332dfd02f4 100644 --- a/ipc/docs/processes.rst +++ b/ipc/docs/processes.rst @@ -320,7 +320,7 @@ process there. `_ for your process, if needed - Hashmap from process type to user-facing string above in `const ProcessType - `_ - For `about:processes` you will probably want to follow the following steps: + Add handling for your new process type producing a unique `fluentName `_, i.e., constructing a dynamic name is highly discouraged diff --git a/js/src/doc/Debugger/Tutorial-Breakpoint.md b/js/src/doc/Debugger/Tutorial-Breakpoint.md index 55b86818579d3..b37c7fb51ac20 100644 --- a/js/src/doc/Debugger/Tutorial-Breakpoint.md +++ b/js/src/doc/Debugger/Tutorial-Breakpoint.md @@ -47,8 +47,8 @@ This tutorial was tested against Firefox 58 Beta and Nightly. It does not work i const { addDebuggerToGlobal } = ChromeUtils.importESModule( "resource://gre/modules/jsdebugger.sys.mjs" ); - const { console } = ChromeUtils.importESModule( - "resource://gre/modules/Console.sys.mjs" + const { console } = ChromeUtils.import( + "resource://gre/modules/Console.jsm" ); // This simply defines 'Debugger' in this Scratchpad; diff --git a/mobile/android/modules/geckoview/GeckoViewUtils.sys.mjs b/mobile/android/modules/geckoview/GeckoViewUtils.sys.mjs index 98480bcae3a38..d0995b58a61e0 100644 --- a/mobile/android/modules/geckoview/GeckoViewUtils.sys.mjs +++ b/mobile/android/modules/geckoview/GeckoViewUtils.sys.mjs @@ -374,7 +374,7 @@ export var GeckoViewUtils = { /** * Add logging functions to the specified scope that forward to the given - * Log.sys.mjs logger. Currently "debug" and "warn" functions are supported. To + * Log.jsm logger. Currently "debug" and "warn" functions are supported. To * log something, call the function through a template literal: * * function foo(bar, baz) { diff --git a/modules/libpref/docs/index.md b/modules/libpref/docs/index.md index c054476687c27..40c8977015bba 100644 --- a/modules/libpref/docs/index.md +++ b/modules/libpref/docs/index.md @@ -231,7 +231,7 @@ activity. ### about:support about:support contains an "Important Modified Preferences" table. It contains all prefs that (a) have had their value changed from the default, and (b) whose -prefix match a allowlist in `Troubleshoot.sys.mjs`. The allowlist matching is to +prefix match a allowlist in `Troubleshoot.jsm`. The allowlist matching is to avoid exposing pref values that might be privacy-sensitive. **Problem:** The allowlist of prefixes is specified separately from the prefs diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index ae6e0a2890854..14929117c045a 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -666,7 +666,7 @@ pref("toolkit.scrollbox.smoothScroll", true); pref("toolkit.scrollbox.scrollIncrement", 20); pref("toolkit.scrollbox.clickToScroll.scrollDelay", 150); -// Controls logging for Sqlite.sys.mjs. +// Controls logging for Sqlite.jsm. pref("toolkit.sqlitejsm.loglevel", "Error"); pref("toolkit.tabbox.switchByScrolling", false); diff --git a/mots.yaml b/mots.yaml index 1af007f801d7d..6e6c1332a3e3d 100644 --- a/mots.yaml +++ b/mots.yaml @@ -2231,7 +2231,7 @@ modules: includes: # TODO # Implementation and consumers of Private Browsing APIs in nsILoadContext, - # nsIPrivateBrowsingChannel, PrivateBrowsingUtils.sys.mjs and the related glue code. ' + # nsIPrivateBrowsingChannel, PrivateBrowsingUtils.jsm and the related glue code. ' meta: owners_emeritus: - Ehsan Akhgari diff --git a/python/mozbuild/mozbuild/test/codecoverage/test_lcov_rewrite.py b/python/mozbuild/mozbuild/test/codecoverage/test_lcov_rewrite.py index e6ccbdff54b40..1b994aaf13968 100644 --- a/python/mozbuild/mozbuild/test/codecoverage/test_lcov_rewrite.py +++ b/python/mozbuild/mozbuild/test/codecoverage/test_lcov_rewrite.py @@ -334,10 +334,10 @@ def setUp(self): "browser/base/content/license.html", None, ], - "dist/bin/modules/AppConstants.sys.mjs": [ - "toolkit/modules/AppConstants.sys.mjs", + "dist/bin/modules/AppConstants.jsm": [ + "toolkit/modules/AppConstants.jsm", { - "101,102": ["toolkit/modules/AppConstants.sys.mjs", 135], + "101,102": ["toolkit/modules/AppConstants.jsm", 135], }, ], }, @@ -422,11 +422,11 @@ def test_chrome_resource_paths(self): ), # Path with pp_info ( - "resource://gre/modules/AppConstants.sys.mjs", + "resource://gre/modules/AppConstants.jsm", ( - "toolkit/modules/AppConstants.sys.mjs", + "toolkit/modules/AppConstants.jsm", { - "101,102": ["toolkit/modules/AppConstants.sys.mjs", 135], + "101,102": ["toolkit/modules/AppConstants.jsm", 135], }, ), ), diff --git a/remote/cdp/domains/content/Runtime.sys.mjs b/remote/cdp/domains/content/Runtime.sys.mjs index 0a1982d2ea4ec..f18491e751f9d 100644 --- a/remote/cdp/domains/content/Runtime.sys.mjs +++ b/remote/cdp/domains/content/Runtime.sys.mjs @@ -604,7 +604,7 @@ export class Runtime extends ContentProcessDomain { } function fromConsoleAPI(message) { - // From sendConsoleAPIMessage (toolkit/modules/Console.sys.mjs) + // From sendConsoleAPIMessage (toolkit/modules/Console.jsm) return { arguments: message.arguments, innerWindowId: message.innerID, diff --git a/remote/marionette/prefs.sys.mjs b/remote/marionette/prefs.sys.mjs index d5fb6cde413da..7cdc4c6f12213 100644 --- a/remote/marionette/prefs.sys.mjs +++ b/remote/marionette/prefs.sys.mjs @@ -110,7 +110,7 @@ export class Branch { * `LogBranch` specialisation deserialises the string value to the * correct `Log.Level` by sanitising the input data first. * - * A further complication is that we cannot rely on `Preferences.sys.mjs` + * A further complication is that we cannot rely on `Preferences.jsm` * in Marionette. See https://bugzilla.mozilla.org/show_bug.cgi?id=1357517 * for further details. */ diff --git a/remote/shared/Log.sys.mjs b/remote/shared/Log.sys.mjs index 9cc97d9d51406..970adb993665c 100644 --- a/remote/shared/Log.sys.mjs +++ b/remote/shared/Log.sys.mjs @@ -34,7 +34,7 @@ XPCOMUtils.defineLazyGetter(lazy, "prefLogLevel", () => { return PREF_REMOTE_LOG_LEVEL; }); -/** E10s compatible wrapper for the standard logger from Log.sys.mjs. */ +/** E10s compatible wrapper for the standard logger from Log.jsm. */ export class Log { static TYPES = { CDP: "CDP", @@ -71,7 +71,7 @@ export class Log { } static get verbose() { - // we can't use Preferences.sys.mjs before first paint, + // we can't use Preferences.jsm before first paint, // see ../browser/base/content/test/performance/browser_startup.js const level = Services.prefs.getStringPref(PREF_REMOTE_LOG_LEVEL, "Info"); return StdLog.Level[level] >= StdLog.Level.Info; diff --git a/security/manager/ssl/RemoteSecuritySettings.jsm b/security/manager/ssl/RemoteSecuritySettings.jsm index 9a432643b1a25..0fbe084cd1e6f 100644 --- a/security/manager/ssl/RemoteSecuritySettings.jsm +++ b/security/manager/ssl/RemoteSecuritySettings.jsm @@ -39,7 +39,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { return new ConsoleAPI({ prefix: "RemoteSecuritySettings.jsm", // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: LOGLEVEL_PREF, }); diff --git a/security/sandbox/linux/reporter/SandboxReporter.cpp b/security/sandbox/linux/reporter/SandboxReporter.cpp index a7c71cd5c961e..29988d2345d9d 100644 --- a/security/sandbox/linux/reporter/SandboxReporter.cpp +++ b/security/sandbox/linux/reporter/SandboxReporter.cpp @@ -96,7 +96,7 @@ SandboxReporter* SandboxReporter::Singleton() { // thread before freeing anything, IPC should already be shut down // by that point (so it won't race by calling Singleton()), all // non-main XPCOM threads will also be shut down, and currently - // the only other user is the main-thread-only Troubleshoot.sys.mjs. + // the only other user is the main-thread-only Troubleshoot.jsm. NS_DispatchToMainThread(NS_NewRunnableFunction( "SandboxReporter::Singleton", [] { ClearOnShutdown(&sSingleton); })); } diff --git a/services/common/tests/unit/test_storage_adapter_shutdown.js b/services/common/tests/unit/test_storage_adapter_shutdown.js index 0ddcdae6df8c6..0b7dca8b06c1a 100644 --- a/services/common/tests/unit/test_storage_adapter_shutdown.js +++ b/services/common/tests/unit/test_storage_adapter_shutdown.js @@ -14,7 +14,7 @@ add_task(async function test_sqlite_shutdown() { path: "kinto.sqlite", }); - // Shutdown Sqlite.sys.mjs synchronously. + // Shutdown Sqlite.jsm synchronously. Services.prefs.setBoolPref("toolkit.asyncshutdown.testing", true); AsyncShutdown.profileBeforeChange._trigger(); Services.prefs.clearUserPref("toolkit.asyncshutdown.testing"); diff --git a/services/fxaccounts/FxAccountsPairingChannel.js b/services/fxaccounts/FxAccountsPairingChannel.js index 0e9597d6fb181..7624720f3d566 100644 --- a/services/fxaccounts/FxAccountsPairingChannel.js +++ b/services/fxaccounts/FxAccountsPairingChannel.js @@ -22,7 +22,7 @@ // from Firefox browser code, hence the presence of these privileged browser APIs. // If you're trying to use this from ordinary web content you're in for a bad time. -const {setTimeout} = ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs"); +const {setTimeout} = ChromeUtils.import("resource://gre/modules/Timer.jsm"); // We cannot use WebSocket from chrome code without a window, // see https://bugzilla.mozilla.org/show_bug.cgi?id=784686 const browser = Services.appShell.createWindowlessBrowser(true); diff --git a/services/fxaccounts/FxAccountsWebChannel.jsm b/services/fxaccounts/FxAccountsWebChannel.jsm index 2267f79f249d7..9e00636e64141 100644 --- a/services/fxaccounts/FxAccountsWebChannel.jsm +++ b/services/fxaccounts/FxAccountsWebChannel.jsm @@ -120,7 +120,7 @@ function getErrorDetails(error) { .replace(/\/.*\//gm, "[REDACTED]"); let details = { message: cleanMessage, stack: null }; - // Adapted from Console.sys.mjs. + // Adapted from Console.jsm. if (error.stack) { let frames = []; for (let frame = error.stack; frame; frame = frame.caller) { diff --git a/services/interfaces/mozIServicesLogSink.idl b/services/interfaces/mozIServicesLogSink.idl index ea17750552e69..cbe22545eae34 100644 --- a/services/interfaces/mozIServicesLogSink.idl +++ b/services/interfaces/mozIServicesLogSink.idl @@ -4,7 +4,7 @@ #include "nsISupports.idl" -// Adapts a `Log.sys.mjs` logger so that it can be used from native (Rust) code. +// Adapts a `Log.jsm` logger so that it can be used from native (Rust) code. // The synced bookmarks mirror and bridged engines implement this interface // to hook in to the services `LogManager` infrastructure. [scriptable, uuid(c92bfe0d-50b7-4a7f-9686-fe5335a696b9)] diff --git a/services/settings/Utils.jsm b/services/settings/Utils.jsm index 688644884e5d8..55bd2009ef47b 100644 --- a/services/settings/Utils.jsm +++ b/services/settings/Utils.jsm @@ -34,8 +34,7 @@ XPCOMUtils.defineLazyServiceGetter( ); // Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref. -// See LOG_LEVELS in Console.sys.mjs. Common examples: "all", "debug", "info", -// "warn", "error". +// See LOG_LEVELS in Console.jsm. Common examples: "all", "debug", "info", "warn", "error". const log = (() => { const { ConsoleAPI } = ChromeUtils.importESModule( "resource://gre/modules/Console.sys.mjs" diff --git a/services/sync/golden_gate/src/log.rs b/services/sync/golden_gate/src/log.rs index ec60a6f990227..c8c9173212efd 100644 --- a/services/sync/golden_gate/src/log.rs +++ b/services/sync/golden_gate/src/log.rs @@ -26,7 +26,7 @@ impl Default for LogSink { impl LogSink { /// Creates a log sink that adapts the Rust `log` crate to the Sync - /// `Log.sys.mjs` logger. + /// `Log.jsm` logger. /// /// This is copied from `bookmark_sync::Logger`. It would be nice to share /// these, but, for now, we've just duplicated it to make prototyping diff --git a/services/sync/modules/bridged_engine.js b/services/sync/modules/bridged_engine.js index 234d5c305f87e..629ab980bcad5 100644 --- a/services/sync/modules/bridged_engine.js +++ b/services/sync/modules/bridged_engine.js @@ -149,7 +149,7 @@ class InterruptedError extends Error { } /** - * Adapts a `Log.sys.mjs` logger to a `mozIServicesLogSink`. This class is copied + * Adapts a `Log.jsm` logger to a `mozIServicesLogSink`. This class is copied * from `SyncedBookmarksMirror.jsm`. */ class LogAdapter { diff --git a/storage/mozIStorageAsyncConnection.idl b/storage/mozIStorageAsyncConnection.idl index 00cf736dc1d8d..5edfadebae2eb 100644 --- a/storage/mozIStorageAsyncConnection.idl +++ b/storage/mozIStorageAsyncConnection.idl @@ -84,16 +84,16 @@ interface mozIStorageAsyncConnection : nsISupports { * `createStatement("BEGIN").execute()` on a `mozIStorageConnection`. * 3. Executing an async statement, like * `createAsyncStatement("BEGIN").executeAsync(...)`. This is what - * `Sqlite.sys.mjs` does under the hood. + * `Sqlite.jsm` does under the hood. * * Because of this, it's important *not* to use this attribute to decide * whether to *commit* the active transaction, because the caller that opened * it may not expect that. This is why both `mozStorageTransaction` and - * `Sqlite.sys.mjs` use an internal variable (`mHasTransaction` for the former; + * `Sqlite.jsm` use an internal variable (`mHasTransaction` for the former; * `_hasInProgressTransaction` for the latter) to check if their transaction * is already in progress, instead of just checking this attribute before * committing. Otherwise, mozStorage might accidentally commit (or roll back!) - * a transaction started by `Sqlite.sys.mjs`, and vice versa. + * a transaction started by `Sqlite.jsm`, and vice versa. */ readonly attribute boolean transactionInProgress; diff --git a/storage/rust/src/lib.rs b/storage/rust/src/lib.rs index 91984bcafcde5..807218fb9e949 100644 --- a/storage/rust/src/lib.rs +++ b/storage/rust/src/lib.rs @@ -131,7 +131,7 @@ impl Conn { /// error. /// /// Note that this is `true` even if the transaction was started by another - /// caller, like `Sqlite.sys.mjs` or `mozStorageTransaction` from C++. See the + /// caller, like `Sqlite.jsm` or `mozStorageTransaction` from C++. See the /// explanation above `mozIStorageConnection.transactionInProgress` for why /// this matters. pub fn transaction_in_progress(&self) -> Result { diff --git a/testing/docs/mochitest-plain/faq.md b/testing/docs/mochitest-plain/faq.md index 1c1a7091a0313..55200b245120c 100644 --- a/testing/docs/mochitest-plain/faq.md +++ b/testing/docs/mochitest-plain/faq.md @@ -241,7 +241,7 @@ browser often reorders requests and so your code must be resilient to that to avoid intermittent failures. ```js -let { setTimeout } = ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs"); +let { setTimeout } = ChromeUtils.import("resource://gre/modules/Timer.jsm"); function handleRequest(request, response) { response.processAsync(); diff --git a/testing/geckodriver/src/logging.rs b/testing/geckodriver/src/logging.rs index 78c97b61b05e0..73ce0621803e7 100644 --- a/testing/geckodriver/src/logging.rs +++ b/testing/geckodriver/src/logging.rs @@ -7,7 +7,7 @@ //! The [`log`] crate provides a single logging API that abstracts over the //! actual logging implementation. This module uses the logging API //! to provide a log implementation that shares many aesthetical traits with -//! [Log.sys.mjs] from Gecko. +//! [Log.jsm] from Gecko. //! //! Using the [`error!`], [`warn!`], [`info!`], [`debug!`], and //! [`trace!`] macros from `log` will output a timestamp field, followed by the @@ -22,7 +22,7 @@ //! and `Level::Config` becomes `log::Level::Debug`. //! //! [`log`]: https://docs.rs/log/newest/log/ -//! [Log.sys.mjs]: https://searchfox.org/mozilla-central/source/toolkit/modules/Log.sys.mjs +//! [Log.jsm]: https://developer.mozilla.org/en/docs/Mozilla/JavaScript_code_modules/Log.jsm //! [`error!`]: https://docs.rs/log/newest/log/macro.error.html //! [`warn!`]: https://docs.rs/log/newest/log/macro.warn.html //! [`info!`]: https://docs.rs/log/newest/log/macro.info.html @@ -49,9 +49,9 @@ const LOGGED_TARGETS: &[&str] = &[ "webdriver", ]; -/// Logger levels from [Log.sys.mjs]. +/// Logger levels from [Log.jsm]. /// -/// [Log.sys.mjs]: https://searchfox.org/mozilla-central/source/toolkit/modules/Log.sys.mjs +/// [Log.jsm]: https://developer.mozilla.org/en/docs/Mozilla/JavaScript_code_modules/Log.jsm #[repr(usize)] #[derive(Clone, Copy, Eq, Debug, Hash, PartialEq)] pub enum Level { diff --git a/testing/marionette/client/marionette_driver/marionette.py b/testing/marionette/client/marionette_driver/marionette.py index 327d60b948b35..7839bae928f20 100644 --- a/testing/marionette/client/marionette_driver/marionette.py +++ b/testing/marionette/client/marionette_driver/marionette.py @@ -769,8 +769,8 @@ def clear_pref(self, pref): with self.using_context(self.CONTEXT_CHROME): self.execute_script( """ - const { Preferences } = ChromeUtils.importESModules( - "resource://gre/modules/Preferences.sys.mjs" + const { Preferences } = ChromeUtils.import( + "resource://gre/modules/Preferences.jsm" ); Preferences.reset(arguments[0]); """, @@ -796,8 +796,8 @@ def get_pref(self, pref, default_branch=False, value_type="unspecified"): with self.using_context(self.CONTEXT_CHROME): pref_value = self.execute_script( """ - const { Preferences } = ChromeUtils.importESModules( - "resource://gre/modules/Preferences.sys.mjs" + const { Preferences } = ChromeUtils.import( + "resource://gre/modules/Preferences.jsm" ); let pref = arguments[0]; @@ -835,8 +835,8 @@ def set_pref(self, pref, value, default_branch=False): self.execute_script( """ - const { Preferences } = ChromeUtils.importESModules( - "resource://gre/modules/Preferences.sys.mjs" + const { Preferences } = ChromeUtils.import( + "resource://gre/modules/Preferences.jsm" ); let pref = arguments[0]; diff --git a/testing/marionette/harness/marionette_harness/tests/unit/test_crash.py b/testing/marionette/harness/marionette_harness/tests/unit/test_crash.py index 5d4877c7b8edd..94b12aa79b427 100644 --- a/testing/marionette/harness/marionette_harness/tests/unit/test_crash.py +++ b/testing/marionette/harness/marionette_harness/tests/unit/test_crash.py @@ -33,8 +33,8 @@ def __init__(self, marionette): with self.marionette.using_context("chrome"): self.crash_reporter_enabled = self.marionette.execute_script( """ - const { AppConstants } = ChromeUtils.importESModule( - "resource://gre/modules/AppConstants.sys.mjs" + const { AppConstants } = ChromeUtils.import( + "resource://gre/modules/AppConstants.jsm" ); return AppConstants.MOZ_CRASHREPORTER; """ diff --git a/testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py b/testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py index 725b8d83c6933..7ccaf2b803085 100644 --- a/testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py +++ b/testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py @@ -78,8 +78,8 @@ def is_remote_tab(self): # TODO: DO NOT USE MOST RECENT WINDOW BUT CURRENT ONE return self.marionette.execute_script( """ - const { AppConstants } = ChromeUtils.importESModule( - "resource://gre/modules/AppConstants.sys.mjs" + const { AppConstants } = ChromeUtils.import( + "resource://gre/modules/AppConstants.jsm" ); let win = null; diff --git a/testing/marionette/harness/marionette_harness/tests/unit/test_proxy.py b/testing/marionette/harness/marionette_harness/tests/unit/test_proxy.py index 2dfed5d63e3df..527e602bbc41f 100644 --- a/testing/marionette/harness/marionette_harness/tests/unit/test_proxy.py +++ b/testing/marionette/harness/marionette_harness/tests/unit/test_proxy.py @@ -22,8 +22,8 @@ def tearDown(self): with self.marionette.using_context("chrome"): self.marionette.execute_script( """ - const { Preferences } = ChromeUtils.importESModules( - "resource://gre/modules/Preferences.sys.mjs" + const { Preferences } = ChromeUtils.import( + "resource://gre/modules/Preferences.jsm" ); Preferences.resetBranch("network.proxy"); """ diff --git a/testing/marionette/harness/marionette_harness/tests/unit/test_switch_window_content.py b/testing/marionette/harness/marionette_harness/tests/unit/test_switch_window_content.py index 5cae84ed8ecc3..311b06246e1c4 100644 --- a/testing/marionette/harness/marionette_harness/tests/unit/test_switch_window_content.py +++ b/testing/marionette/harness/marionette_harness/tests/unit/test_switch_window_content.py @@ -42,8 +42,8 @@ def get_selected_tab_index(self): with self.marionette.using_context("chrome"): return self.marionette.execute_script( """ - const { AppConstants } = ChromeUtils.importESModules( - "resource://gre/modules/AppConstants.sys.mjs" + const { AppConstants } = ChromeUtils.import( + "resource://gre/modules/AppConstants.jsm" ); let win = null; diff --git a/testing/mochitest/tests/SimpleTest/MozillaLogger.js b/testing/mochitest/tests/SimpleTest/MozillaLogger.js index 07d50572b0cdd..3e54ebd9732a7 100644 --- a/testing/mochitest/tests/SimpleTest/MozillaLogger.js +++ b/testing/mochitest/tests/SimpleTest/MozillaLogger.js @@ -8,12 +8,12 @@ function formatLogMessage(msg) { return msg.info.join(" ") + "\n"; } -function importMJS(mjs) { +function importJSM(jsm) { if (typeof ChromeUtils === "object") { - return ChromeUtils.importESModule(mjs); + return ChromeUtils.import(jsm); } /* globals SpecialPowers */ - return SpecialPowers.ChromeUtils.importESModule(mjs); + return SpecialPowers.ChromeUtils.import(jsm); } // When running in release builds, we get a fake Components object in @@ -59,7 +59,7 @@ class MozillaFileLogger extends MozillaLogger { constructor(aPath) { super(); - const { FileUtils } = importMJS("resource://gre/modules/FileUtils.sys.mjs"); + const { FileUtils } = importJSM("resource://gre/modules/FileUtils.jsm"); this._file = FileUtils.File(aPath); this._foStream = FileUtils.openFileOutputStream( diff --git a/testing/xpcshell/selftest.py b/testing/xpcshell/selftest.py index c9c90d0fca90f..47d69ace19141 100755 --- a/testing/xpcshell/selftest.py +++ b/testing/xpcshell/selftest.py @@ -294,8 +294,8 @@ # A test for asynchronous cleanup functions ASYNC_CLEANUP = """ function run_test() { - let { PromiseUtils } = ChromeUtils.importESModule( - "resource://gre/modules/PromiseUtils.sys.mjs" + let { PromiseUtils } = ChromeUtils.import( + "resource://gre/modules/PromiseUtils.jsm" ); // The list of checkpoints in the order we encounter them. diff --git a/toolkit/actors/AboutHttpsOnlyErrorChild.jsm b/toolkit/actors/AboutHttpsOnlyErrorChild.jsm index 807f5789669e1..4fed33d1a1d3e 100644 --- a/toolkit/actors/AboutHttpsOnlyErrorChild.jsm +++ b/toolkit/actors/AboutHttpsOnlyErrorChild.jsm @@ -25,7 +25,7 @@ class AboutHttpsOnlyErrorChild extends RemotePageChild { actorCreated() { super.actorCreated(); - // If you add a new function, remember to add it to RemotePageAccessManager.sys.mjs + // If you add a new function, remember to add it to RemotePageAccessManager.jsm // to allow content-privileged about:httpsonlyerror to use it. const exportableFunctions = [ "RPMTryPingSecureWWWLink", diff --git a/toolkit/actors/NetErrorChild.jsm b/toolkit/actors/NetErrorChild.jsm index 0e242497d9a1f..c45019d3cf2f9 100644 --- a/toolkit/actors/NetErrorChild.jsm +++ b/toolkit/actors/NetErrorChild.jsm @@ -13,7 +13,7 @@ class NetErrorChild extends RemotePageChild { actorCreated() { super.actorCreated(); - // If you add a new function, remember to add it to RemotePageAccessManager.sys.mjs + // If you add a new function, remember to add it to RemotePageAccessManager.jsm // to allow content-privileged about:neterror or about:certerror to use it. const exportableFunctions = [ "RPMGetAppBuildID", diff --git a/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs b/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs index 38b4cc147d1b2..a1cf1336a3c1d 100644 --- a/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs +++ b/toolkit/components/backgroundtasks/BackgroundTasksManager.sys.mjs @@ -17,7 +17,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { ); let consoleOptions = { // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: "toolkit.backgroundtasks.loglevel", prefix: "BackgroundTasksManager", diff --git a/toolkit/components/backgroundtasks/BackgroundTasksUtils.sys.mjs b/toolkit/components/backgroundtasks/BackgroundTasksUtils.sys.mjs index 1e41190a6257c..512af13426916 100644 --- a/toolkit/components/backgroundtasks/BackgroundTasksUtils.sys.mjs +++ b/toolkit/components/backgroundtasks/BackgroundTasksUtils.sys.mjs @@ -13,7 +13,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { ); let consoleOptions = { // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: "toolkit.backgroundtasks.loglevel", prefix: "BackgroundTasksUtils", diff --git a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs index 476a6acb5d5b8..b873f4a25693a 100644 --- a/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs +++ b/toolkit/components/enterprisepolicies/EnterprisePoliciesParent.sys.mjs @@ -56,7 +56,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { return new ConsoleAPI({ prefix: "Enterprise Policies", // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: PREF_LOGLEVEL, }); diff --git a/toolkit/components/enterprisepolicies/WindowsGPOParser.sys.mjs b/toolkit/components/enterprisepolicies/WindowsGPOParser.sys.mjs index 13041069ff91a..827dfc6146e72 100644 --- a/toolkit/components/enterprisepolicies/WindowsGPOParser.sys.mjs +++ b/toolkit/components/enterprisepolicies/WindowsGPOParser.sys.mjs @@ -15,7 +15,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { return new ConsoleAPI({ prefix: "GPOParser.jsm", // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: PREF_LOGLEVEL, }); diff --git a/toolkit/components/enterprisepolicies/macOSPoliciesParser.sys.mjs b/toolkit/components/enterprisepolicies/macOSPoliciesParser.sys.mjs index db2793a6ab207..234f8298a1e65 100644 --- a/toolkit/components/enterprisepolicies/macOSPoliciesParser.sys.mjs +++ b/toolkit/components/enterprisepolicies/macOSPoliciesParser.sys.mjs @@ -15,7 +15,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { return new ConsoleAPI({ prefix: "macOSPoliciesParser.jsm", // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: PREF_LOGLEVEL, }); diff --git a/toolkit/components/extensions/test/xpcshell/test_ext_storage_idb_data_migration.js b/toolkit/components/extensions/test/xpcshell/test_ext_storage_idb_data_migration.js index 2484efcc33e76..227ada30ad962 100644 --- a/toolkit/components/extensions/test/xpcshell/test_ext_storage_idb_data_migration.js +++ b/toolkit/components/extensions/test/xpcshell/test_ext_storage_idb_data_migration.js @@ -471,7 +471,7 @@ add_task(async function test_extensionId_trimmed_in_telemetry_event() { // can't be successfully migrated to the new storage backend, then: // - the new storage backend for that extension is still initialized and enabled // - any new data is being stored in the new backend -// - the old file is being renamed (with the `.corrupted` suffix that JSONFile.sys.mjs +// - the old file is being renamed (with the `.corrupted` suffix that JSONFile.jsm // adds when it fails to load the data file) and still available on disk. add_task(async function test_storage_local_corrupted_data_migration() { const EXTENSION_ID = "extension-corrupted-data-migration@mozilla.org"; diff --git a/toolkit/components/formautofill/FormAutofillNative.cpp b/toolkit/components/formautofill/FormAutofillNative.cpp index bea61eb2160b8..21e97417da166 100644 --- a/toolkit/components/formautofill/FormAutofillNative.cpp +++ b/toolkit/components/formautofill/FormAutofillNative.cpp @@ -359,7 +359,7 @@ const Rule kFirefoxRules[] = { {RegexKey::YEAR, "year"}, {RegexKey::MMYY, "mm\\s*(/|\\\\)\\s*yy"}, {RegexKey::VISA_CHECKOUT, "visa(-|\\s)checkout"}, - // This should be a union of NETWORK_NAMES in CreditCard.sys.mjs + // This should be a union of NETWORK_NAMES in CreditCard.jsm {RegexKey::CREDIT_CARD_NETWORK_LONG, "american express|master card|union pay"}, // Please also update CREDIT_CARD_NETWORK_EXACT_MATCH while updating diff --git a/toolkit/components/normandy/lib/LogManager.jsm b/toolkit/components/normandy/lib/LogManager.jsm index 07420b81ae40d..44f89f4c3c0a7 100644 --- a/toolkit/components/normandy/lib/LogManager.jsm +++ b/toolkit/components/normandy/lib/LogManager.jsm @@ -18,7 +18,7 @@ var LogManager = { * Configure the root logger for the Recipe Client. Must be called at * least once before using any loggers created via getLogger. * @param {Number} loggingLevel - * Logging level to use as defined in Log.sys.mjs + * Logging level to use as defined in Log.jsm */ configure(loggingLevel) { if (!rootLogger) { diff --git a/toolkit/components/passwordmgr/LoginManagerPrompter.jsm b/toolkit/components/passwordmgr/LoginManagerPrompter.jsm index 6df9aafb4746d..d84eacb896a66 100644 --- a/toolkit/components/passwordmgr/LoginManagerPrompter.jsm +++ b/toolkit/components/passwordmgr/LoginManagerPrompter.jsm @@ -162,7 +162,7 @@ class LoginManagerPrompter { } /** - * Displays the PopupNotifications.sys.mjs doorhanger for password save or change. + * Displays the PopupNotifications.jsm doorhanger for password save or change. * * @param {Element} browser * The browser to show the doorhanger on. diff --git a/toolkit/components/places/Bookmarks.sys.mjs b/toolkit/components/places/Bookmarks.sys.mjs index e9fecb4dd41bf..4337b59058729 100644 --- a/toolkit/components/places/Bookmarks.sys.mjs +++ b/toolkit/components/places/Bookmarks.sys.mjs @@ -3066,7 +3066,7 @@ function validateBookmarkObject(name, input, behavior) { * Updates frecency for a list of URLs. * * @param db - * the Sqlite.sys.mjs connection handle. + * the Sqlite.jsm connection handle. * @param urls * the array of URLs to update. */ @@ -3097,7 +3097,7 @@ var updateFrecency = async function(db, urls) { * Removes any orphan annotation entries. * * @param db - * the Sqlite.sys.mjs connection handle. + * the Sqlite.jsm connection handle. */ var removeOrphanAnnotations = async function(db) { await db.executeCached( @@ -3121,7 +3121,7 @@ var removeOrphanAnnotations = async function(db) { * Removes annotations for a given item. * * @param db - * the Sqlite.sys.mjs connection handle. + * the Sqlite.jsm connection handle. * @param items * The items for which to remove annotations. */ @@ -3147,7 +3147,7 @@ var removeAnnotationsForItems = async function(db, items) { * Updates lastModified for all the ancestors of a given folder GUID. * * @param db - * the Sqlite.sys.mjs connection handle. + * the Sqlite.jsm connection handle. * @param folderGuid * the GUID of the folder whose ancestors should be updated. * @param time @@ -3196,7 +3196,7 @@ var setAncestorsLastModified = async function( * Remove all descendants of one or more bookmark folders. * * @param {Object} db - * the Sqlite.sys.mjs connection handle. + * the Sqlite.jsm connection handle. * @param {Array} folderGuids * array of folder guids. * @return {Array} diff --git a/toolkit/components/places/PlacesSyncUtils.sys.mjs b/toolkit/components/places/PlacesSyncUtils.sys.mjs index fa4a32be445bc..9505006031786 100644 --- a/toolkit/components/places/PlacesSyncUtils.sys.mjs +++ b/toolkit/components/places/PlacesSyncUtils.sys.mjs @@ -592,7 +592,7 @@ const BookmarkSyncUtils = (PlacesSyncUtils.bookmarks = Object.freeze({ * remaining items to "NEW"; and don't wipe the server. * * @param db - * the Sqlite.sys.mjs connection handle. + * the Sqlite.jsm connection handle. * @param source * the change source constant. */ @@ -1182,7 +1182,7 @@ const BookmarkSyncUtils = (PlacesSyncUtils.bookmarks = Object.freeze({ * tag or keyword entry. * * @param db - * the Sqlite.sys.mjs connection handle. + * the Sqlite.jsm connection handle. * @param url * the bookmark URL object. * @param syncChangeDelta @@ -1848,7 +1848,7 @@ function addRowToChangeRecords(row, changeRecords) { * changeset for the Sync bookmarks engine. * * @param db - * The Sqlite.sys.mjs connection handle. + * The Sqlite.jsm connection handle. * @param forGuids * Fetch Sync tracking information for only the requested GUIDs. * @return {Promise} resolved once all items have been fetched. diff --git a/toolkit/components/places/PlacesUtils.sys.mjs b/toolkit/components/places/PlacesUtils.sys.mjs index 8c39c2d25ad00..57fdecfb89890 100644 --- a/toolkit/components/places/PlacesUtils.sys.mjs +++ b/toolkit/components/places/PlacesUtils.sys.mjs @@ -1454,7 +1454,7 @@ export var PlacesUtils = { }, /** - * Gets a shared Sqlite.sys.mjs readonly connection to the Places database, + * Gets a shared Sqlite.jsm readonly connection to the Places database, * usable only for SELECT queries. * * This is intended to be used mostly internally, components outside of @@ -1480,14 +1480,14 @@ export var PlacesUtils = { }, /** - * Returns a Sqlite.sys.mjs wrapper for the main Places connection. Most callers + * Returns a Sqlite.jsm wrapper for the main Places connection. Most callers * should prefer `withConnectionWrapper`, which ensures that all database * operations finish before the connection is closed. */ promiseUnsafeWritableDBConnection: () => lazy.gAsyncDBWrapperPromised, /** - * Performs a read/write operation on the Places database through a Sqlite.sys.mjs + * Performs a read/write operation on the Places database through a Sqlite.jsm * wrapped connection to the Places database. * * This is intended to be used only by Places itself, always use APIs if you @@ -1509,7 +1509,7 @@ export var PlacesUtils = { * * @param {string} name The name of the operation. Used for debugging, logging * and crash reporting. - * @param {function(db)} task A function that takes as argument a Sqlite.sys.mjs + * @param {function(db)} task A function that takes as argument a Sqlite.jsm * connection and returns a Promise. Shutdown is guaranteed to not interrupt * execution of `task`. */ @@ -2116,10 +2116,10 @@ function setupDbForShutdown(conn, name) { // database. We just need to close the high-level connection. try { await conn.close(); - state = "2. Closed Sqlite.sys.mjs connection."; + state = "2. Closed Sqlite.jsm connection."; resolve(); } catch (ex) { - state = "2. Failed to closed Sqlite.sys.mjs connection: " + ex; + state = "2. Failed to closed Sqlite.jsm connection: " + ex; reject(ex); } }, @@ -2132,10 +2132,10 @@ function setupDbForShutdown(conn, name) { } }).catch(Cu.reportError); - // Make sure that Sqlite.sys.mjs doesn't close until we are done + // Make sure that Sqlite.jsm doesn't close until we are done // with the high-level connection. lazy.Sqlite.shutdown.addBlocker( - `${name} must be closed before Sqlite.sys.mjs`, + `${name} must be closed before Sqlite.jsm`, () => promiseClosed, () => state ); diff --git a/toolkit/components/places/SyncedBookmarksMirror.sys.mjs b/toolkit/components/places/SyncedBookmarksMirror.sys.mjs index 150c11c9d1983..108c9c2c526ab 100644 --- a/toolkit/components/places/SyncedBookmarksMirror.sys.mjs +++ b/toolkit/components/places/SyncedBookmarksMirror.sys.mjs @@ -84,7 +84,7 @@ const DEFAULT_MAX_FRECENCIES_TO_RECALCULATE = 400; // Use a shared jankYielder in these functions XPCOMUtils.defineLazyGetter(lazy, "yieldState", () => lazy.Async.yieldState()); -/** Adapts a `Log.sys.mjs` logger to a `mozIServicesLogSink`. */ +/** Adapts a `Log.jsm` logger to a `mozIServicesLogSink`. */ class LogAdapter { constructor(log) { this.log = log; @@ -1136,7 +1136,7 @@ export class SyncedBookmarksMirror { if (signal.aborted) { cancel(); } else { - // `Sqlite.sys.mjs` callbacks swallow exceptions (bug 1387775), so we + // `Sqlite.jsm` callbacks swallow exceptions (bug 1387775), so we // accumulate all rows in an array, and process them after. childGuidRows.push(row); } diff --git a/toolkit/components/places/bookmark_sync/src/merger.rs b/toolkit/components/places/bookmark_sync/src/merger.rs index ca0fc17a75279..c3ef88b4e996d 100644 --- a/toolkit/components/places/bookmark_sync/src/merger.rs +++ b/toolkit/components/places/bookmark_sync/src/merger.rs @@ -178,7 +178,7 @@ impl MergeTask { // merge, since we won't be able to apply the merged tree back to // Places. This is common, especially if the user makes lots of // changes at once. In that case, our merge task might run in the - // middle of a `Sqlite.sys.mjs` transaction, and fail when we try to + // middle of a `Sqlite.jsm` transaction, and fail when we try to // open our own transaction in `Store::apply`. Since the local // tree might be in an inconsistent state, we can't safely update // Places. diff --git a/toolkit/components/processtools/ProcInfo.h b/toolkit/components/processtools/ProcInfo.h index c1b77d7daf457..e23e4bf6d25eb 100644 --- a/toolkit/components/processtools/ProcInfo.h +++ b/toolkit/components/processtools/ProcInfo.h @@ -38,7 +38,7 @@ nsresult GetGpuTimeSinceProcessStartInMs(uint64_t* aResult); // WebIDLProcType, ChromeUtils::RequestProcInfo and ProcTypeToWebIDL to // mirror the changes. enum class ProcType { - // These must match the ones in RemoteType.h, and E10SUtils.sys.mjs + // These must match the ones in RemoteType.h, and E10SUtils.jsm Web, WebIsolated, File, diff --git a/toolkit/components/satchel/FormHistory.jsm b/toolkit/components/satchel/FormHistory.jsm index 7f6afcf957f6f..ef260340c620d 100644 --- a/toolkit/components/satchel/FormHistory.jsm +++ b/toolkit/components/satchel/FormHistory.jsm @@ -792,11 +792,11 @@ var DB = { * notification is fired. * * @returns {Promise} - * @resolves An Sqlite.sys.mjs connection to the database. + * @resolves An Sqlite.jsm connection to the database. * @rejects If connecting to the database, or migrating the database * failed after MAX_ATTEMPTS attempts (where each attempt * backs up and deletes the old database), this will reject - * with the Sqlite.sys.mjs error. + * with the Sqlite.jsm error. */ get conn() { delete this.conn; @@ -828,8 +828,8 @@ var DB = { * The optional number of the attempt that is being made to connect * to the database. Defaults to 0. * @returns {Promise} - * @resolves An Sqlite.sys.mjs connection to the database. - * @rejects After MAX_ATTEMPTS, this will reject with the Sqlite.mjs + * @resolves An Sqlite.jsm connection to the database. + * @rejects After MAX_ATTEMPTS, this will reject with the Sqlite.jsm * error. */ async _establishConn(attemptNum = 0) { diff --git a/toolkit/components/taskscheduler/TaskSchedulerMacOSImpl.jsm b/toolkit/components/taskscheduler/TaskSchedulerMacOSImpl.jsm index c9e3b3d1a3a62..d7453173b4461 100644 --- a/toolkit/components/taskscheduler/TaskSchedulerMacOSImpl.jsm +++ b/toolkit/components/taskscheduler/TaskSchedulerMacOSImpl.jsm @@ -33,7 +33,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { ); let consoleOptions = { // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: "toolkit.components.taskscheduler.loglevel", prefix: "TaskScheduler", diff --git a/toolkit/components/telemetry/Events.yaml b/toolkit/components/telemetry/Events.yaml index 8a5b431cd1bb8..cde9b767cb6d4 100644 --- a/toolkit/components/telemetry/Events.yaml +++ b/toolkit/components/telemetry/Events.yaml @@ -1223,9 +1223,9 @@ pwmgr: jsonfile: load: description: > - Records when JSONFile.sys.mjs consumers are trying to access a missing or corrupt json file. + Records when JSONFile.jsm consumers are trying to access a missing or corrupt json file. For example, Login Store trying to access logins.json when it has gone missing or corrupt. - # Keep synchronized with TELEMETRY_BASENAMES from JSONFile.sys.mjs. + # Keep synchronized with TELEMETRY_BASENAMES from JSONFile.jsm. objects: ["logins", "autofillprofiles"] bug_numbers: [1599567] expiry_version: never diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 8cf01cc3adf23..c636dbe7f43c5 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -7583,7 +7583,7 @@ "kind": "count", "releaseChannelCollection": "opt-out", "bug_numbers": [1137447], - "description": "Update: count of when getAppUpdateAutoEnabled from UpdateUtils.sys.mjs does not return the default value of true (true values are not submitted)" + "description": "Update: count of when getAppUpdateAutoEnabled from UpdateUtils.jsm does not return the default value of true (true values are not submitted)" }, "UPDATE_NOT_PREF_UPDATE_AUTO_NOTIFY": { "record_in_processes": ["main"], @@ -7593,7 +7593,7 @@ "kind": "count", "releaseChannelCollection": "opt-out", "bug_numbers": [1137447], - "description": "Update: count of when getAppUpdateAutoEnabled from UpdateUtils.sys.mjs does not return the default value of true (true values are not submitted)" + "description": "Update: count of when getAppUpdateAutoEnabled from UpdateUtils.jsm does not return the default value of true (true values are not submitted)" }, "UPDATE_NOT_PREF_UPDATE_AUTO_SUBSEQUENT": { "record_in_processes": ["main"], @@ -7603,7 +7603,7 @@ "kind": "count", "releaseChannelCollection": "opt-out", "bug_numbers": [353804], - "description": "Update: count of when getAppUpdateAutoEnabled from UpdateUtils.sys.mjs does not return the default value of true (true values are not submitted)" + "description": "Update: count of when getAppUpdateAutoEnabled from UpdateUtils.jsm does not return the default value of true (true values are not submitted)" }, "UPDATE_NOT_PREF_UPDATE_STAGING_ENABLED_EXTERNAL": { "record_in_processes": ["main"], diff --git a/toolkit/components/telemetry/Scalars.yaml b/toolkit/components/telemetry/Scalars.yaml index 3af5715186579..ebd7182667948 100644 --- a/toolkit/components/telemetry/Scalars.yaml +++ b/toolkit/components/telemetry/Scalars.yaml @@ -3220,7 +3220,7 @@ mozstorage: bug_numbers: - 1727261 description: > - Collection of javascript modules that created a Sqlite.sys.mjs transaction + Collection of javascript modules that created a Sqlite.jsm transaction taking too long and timing out. This can be used to identify and optimize those modules transactions. expires: never diff --git a/toolkit/components/telemetry/docs/internals/preferences.rst b/toolkit/components/telemetry/docs/internals/preferences.rst index 3bc1319601635..c57b51a729dee 100644 --- a/toolkit/components/telemetry/docs/internals/preferences.rst +++ b/toolkit/components/telemetry/docs/internals/preferences.rst @@ -106,7 +106,7 @@ Preferences ``toolkit.telemetry.log.level`` - This sets the Telemetry logging verbosity per ``Log.sys.mjs``. The available levels, in descending order of verbosity, are ``Trace``, ``Debug``, ``Config``, ``Info``, ``Warn``, ``Error`` and ``Fatal`` with the default being ``Warn``. + This sets the Telemetry logging verbosity per ``Log.jsm``. The available levels, in descending order of verbosity, are ``Trace``, ``Debug``, ``Config``, ``Info``, ``Warn``, ``Error`` and ``Fatal`` with the default being ``Warn``. By default logging goes only the console service. diff --git a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp index 0ae4aa7ceddbd..9d3c20a6420b0 100644 --- a/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp +++ b/toolkit/components/typeaheadfind/nsTypeAheadFind.cpp @@ -341,7 +341,7 @@ nsresult nsTypeAheadFind::FindItNow(uint32_t aMode, bool aIsLinksOnly, if (!aDontIterateFrames) { // The use of GetInProcessSameTypeRootTreeItem (and later in this method) is // OK here as out-of-process frames are handled externally by - // FinderParent.sys.mjs, which will end up only calling this method with + // FinderParent.jsm, which will end up only calling this method with // aDontIterateFrames set to true. startingDocShell->GetInProcessSameTypeRootTreeItem( getter_AddRefs(rootContentTreeItem)); diff --git a/toolkit/components/utils/JsonSchemaValidator.jsm b/toolkit/components/utils/JsonSchemaValidator.jsm index 0fa7fa175387e..55f91197f95c5 100644 --- a/toolkit/components/utils/JsonSchemaValidator.jsm +++ b/toolkit/components/utils/JsonSchemaValidator.jsm @@ -28,7 +28,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { return new ConsoleAPI({ prefix: "JsonSchemaValidator.jsm", // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", }); }); diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index d3f92d79f7458..f6977f6320f7f 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -86,7 +86,7 @@ function toFluentID(str) { .toLowerCase(); } -// Each property in this object corresponds to a property in Troubleshoot.sys.mjs's +// Each property in this object corresponds to a property in Troubleshoot.jsm's // snapshot data. Each function is passed its property's corresponding data, // and it's the function's job to update the page with it. var snapshotFormatters = { @@ -604,7 +604,7 @@ var snapshotFormatters = { // graphics-failures-tbody tbody if ("failures" in data) { // If indices is there, it should be the same length as failures, - // (see Troubleshoot.sys.mjs) but we check anyway: + // (see Troubleshoot.jsm) but we check anyway: if ("indices" in data && data.failures.length == data.indices.length) { let combined = []; for (let i = 0; i < data.failures.length; i++) { diff --git a/toolkit/content/widgets/findbar.js b/toolkit/content/widgets/findbar.js index 4c2cb922ed6f7..8722e36ea5cb2 100644 --- a/toolkit/content/widgets/findbar.js +++ b/toolkit/content/widgets/findbar.js @@ -97,7 +97,7 @@ } /** - * Please keep in sync with toolkit/modules/FindBarContent.sys.mjs + * Please keep in sync with toolkit/modules/FindBarContent.jsm */ this.FIND_NORMAL = 0; diff --git a/toolkit/modules/BrowserUtils.sys.mjs b/toolkit/modules/BrowserUtils.sys.mjs index 9bcf090971e33..9f58c7adf9bf8 100644 --- a/toolkit/modules/BrowserUtils.sys.mjs +++ b/toolkit/modules/BrowserUtils.sys.mjs @@ -114,12 +114,10 @@ export var BrowserUtils = { }, isFindbarVisible(docShell) { - const FINDER_SYS_MJS = "resource://gre/modules/Finder.sys.mjs"; + const FINDER_JSM = "resource://gre/modules/Finder.jsm"; return ( - Cu.isESModuleLoaded(FINDER_SYS_MJS) && - ChromeUtils.importESModule(FINDER_SYS_MJS).Finder.isFindbarVisible( - docShell - ) + Cu.isModuleLoaded(FINDER_JSM) && + ChromeUtils.import(FINDER_JSM).Finder.isFindbarVisible(docShell) ); }, diff --git a/toolkit/modules/FinderHighlighter.sys.mjs b/toolkit/modules/FinderHighlighter.sys.mjs index 3905bf1c77b2f..536c45b779660 100644 --- a/toolkit/modules/FinderHighlighter.sys.mjs +++ b/toolkit/modules/FinderHighlighter.sys.mjs @@ -157,10 +157,10 @@ function mockAnonymousContentNode(domNode) { let gWindows = new WeakMap(); /** - * FinderHighlighter class that is used by Finder.sys.mjs to take care of the + * FinderHighlighter class that is used by Finder.jsm to take care of the * 'Highlight All' feature, which can highlight all find occurrences in a page. * - * @param {Finder} finder Finder.sys.mjs instance + * @param {Finder} finder Finder.jsm instance * @param {boolean} useTop check and use top-level windows for rectangle * computation, if possible. */ @@ -818,7 +818,7 @@ FinderHighlighter.prototype = { * Utility; returns the bounds of the page relative to the viewport. * If the pages is part of a frameset or inside an iframe of any kind, its * offset is accounted for. - * Geometry.sys.mjs takes care of the DOMRect calculations. + * Geometry.jsm takes care of the DOMRect calculations. * * @param {nsIDOMWindow} window Window to read the boundary rect from * @param {Boolean} [includeScroll] Whether to ignore the scroll offset, diff --git a/toolkit/modules/FinderParent.sys.mjs b/toolkit/modules/FinderParent.sys.mjs index 91b3490c3e514..3c18a1bab87ec 100644 --- a/toolkit/modules/FinderParent.sys.mjs +++ b/toolkit/modules/FinderParent.sys.mjs @@ -202,7 +202,7 @@ FinderParent.prototype = { onResultFound(aResponse) { this._foundSearchString = aResponse.searchString; - // The rect stops being a Geometry.sys.mjs:Rect over IPC. + // The rect stops being a Geometry.jsm:Rect over IPC. if (aResponse.rect) { aResponse.rect = lazy.Rect.fromRect(aResponse.rect); } diff --git a/toolkit/modules/FirstStartup.sys.mjs b/toolkit/modules/FirstStartup.sys.mjs index 9b014849d976e..1d2cffbe90872 100644 --- a/toolkit/modules/FirstStartup.sys.mjs +++ b/toolkit/modules/FirstStartup.sys.mjs @@ -60,7 +60,7 @@ export var FirstStartup = { Promise.all(promises).then(() => (initialized = true)); this.elapsed = 0; - Services.tm.spinEventLoopUntil("FirstStartup.sys.mjs:init", () => { + Services.tm.spinEventLoopUntil("FirstStartup.jsm:init", () => { this.elapsed = Date.now() - startingTime; if (this.elapsed >= timeout) { this._state = this.TIMED_OUT; diff --git a/toolkit/modules/Http.sys.mjs b/toolkit/modules/Http.sys.mjs index 908c8bf9c7141..c4bb30c7df660 100644 --- a/toolkit/modules/Http.sys.mjs +++ b/toolkit/modules/Http.sys.mjs @@ -23,7 +23,7 @@ export function percentEncode(aString) { * parameters: the responseText and the XHR object. * onError, a function handle to call when an error occcurs, it takes three * parameters: the error, the responseText and the XHR object. - * logger, an object that implements the debug and log methods (e.g. Log.sys.mjs). + * logger, an object that implements the debug and log methods (e.g. log.jsm). * * Headers or post data are given as an array of arrays, for each each inner * array the first value is the key and the second is the value, e.g. diff --git a/toolkit/modules/JSONFile.sys.mjs b/toolkit/modules/JSONFile.sys.mjs index abeb38fd7ec61..840faf5200707 100644 --- a/toolkit/modules/JSONFile.sys.mjs +++ b/toolkit/modules/JSONFile.sys.mjs @@ -206,7 +206,7 @@ JSONFile.prototype = { } catch (ex) { // If an exception occurs because the file does not exist or it cannot be read, // we do two things. - // 1. For consumers of JSONFile.sys.mjs that have configured a `backupTo` path option, + // 1. For consumers of JSONFile.jsm that have configured a `backupTo` path option, // we try to look for and use backed up json files first. If the backup // is also not found or if the backup is unreadable, we then start with an empty file. // 2. If a consumer does not configure a `backupTo` path option, we just start @@ -316,7 +316,7 @@ JSONFile.prototype = { } catch (ex) { // If an exception occurs because the file does not exist or it cannot be read, // we do two things. - // 1. For consumers of JSONFile.sys.mjs that have configured a `backupTo` path option, + // 1. For consumers of JSONFile.jsm that have configured a `backupTo` path option, // we try to look for and use backed up json files first. If the backup // is also not found or if the backup is unreadable, we then start with an empty file. // 2. If a consumer does not configure a `backupTo` path option, we just start diff --git a/toolkit/modules/Region.sys.mjs b/toolkit/modules/Region.sys.mjs index ff5a179403095..342aa67228817 100644 --- a/toolkit/modules/Region.sys.mjs +++ b/toolkit/modules/Region.sys.mjs @@ -87,7 +87,7 @@ XPCOMUtils.defineLazyServiceGetter( ); const log = console.createInstance({ - prefix: "Region.sys.mjs", + prefix: "Region.jsm", maxLogLevel: lazy.loggingEnabled ? "All" : "Warn", }); @@ -134,7 +134,7 @@ class RegionDetector { _retryCount = 0; // Let tests wait for init to complete. _initPromise = null; - // Topic for Observer events fired by Region.sys.mjs. + // Topic for Observer events fired by Region.jsm. REGION_TOPIC = "browser-region-updated"; // Values for telemetry. TELEMETRY = { diff --git a/toolkit/modules/RemotePageAccessManager.sys.mjs b/toolkit/modules/RemotePageAccessManager.sys.mjs index 2b054425d9dda..0a807cae8f2ff 100644 --- a/toolkit/modules/RemotePageAccessManager.sys.mjs +++ b/toolkit/modules/RemotePageAccessManager.sys.mjs @@ -13,7 +13,7 @@ * This module may be used from both the child and parent process. * * Please note that prefs that one wants to update need to be - * explicitly allowed within AsyncPrefs.sys.mjs. + * explicitly allowed within AsyncPrefs.jsm. */ export let RemotePageAccessManager = { /* The accessMap lists the permissions that are allowed per page. diff --git a/toolkit/modules/Sqlite.sys.mjs b/toolkit/modules/Sqlite.sys.mjs index c0d3c22121afa..342153bdda62f 100644 --- a/toolkit/modules/Sqlite.sys.mjs +++ b/toolkit/modules/Sqlite.sys.mjs @@ -33,7 +33,7 @@ var likeSqlRegex = /\bLIKE\b\s(?![@:?])/i; var connectionCounters = new Map(); // Tracks identifiers of wrapped connections, that are Storage connections -// opened through mozStorage and then wrapped by Sqlite.sys.mjs to use its syntactic +// opened through mozStorage and then wrapped by Sqlite.jsm to use its syntactic // sugar API. Since these connections have an unknown origin, we use this set // to differentiate their behavior. var wrappedConnections = new Set(); @@ -147,19 +147,19 @@ function convertStorageErrorResult(result) { } } /** - * Barriers used to ensure that Sqlite.sys.mjs is shutdown after all + * Barriers used to ensure that Sqlite.jsm is shutdown after all * its clients. */ XPCOMUtils.defineLazyGetter(lazy, "Barriers", () => { let Barriers = { /** * Public barrier that clients may use to add blockers to the - * shutdown of Sqlite.sys.mjs. Triggered by profile-before-change. + * shutdown of Sqlite.jsm. Triggered by profile-before-change. * Once all blockers of this barrier are lifted, we close the * ability to open new connections. */ shutdown: new lazy.AsyncShutdown.Barrier( - "Sqlite.sys.mjs: wait until all clients have completed their task" + "Sqlite.jsm: wait until all clients have completed their task" ), /** @@ -168,7 +168,7 @@ XPCOMUtils.defineLazyGetter(lazy, "Barriers", () => { * set to `true`. */ connections: new lazy.AsyncShutdown.Barrier( - "Sqlite.sys.mjs: wait until all connections are closed" + "Sqlite.jsm: wait until all connections are closed" ), }; @@ -202,13 +202,13 @@ XPCOMUtils.defineLazyGetter(lazy, "Barriers", () => { Services.obs.addObserver(finalizationObserver, "sqlite-finalization-witness"); /** - * Ensure that Sqlite.sys.mjs: + * Ensure that Sqlite.jsm: * - informs its clients before shutting down; * - lets clients open connections during shutdown, if necessary; * - waits for all connections to be closed before shutdown. */ lazy.AsyncShutdown.profileBeforeChange.addBlocker( - "Sqlite.sys.mjs shutdown blocker", + "Sqlite.jsm shutdown blocker", async function() { await Barriers.shutdown.wait(); // At this stage, all clients have had a chance to open (and close) @@ -271,7 +271,7 @@ XPCOMUtils.defineLazyGetter(lazy, "Barriers", () => { */ function ConnectionData(connection, identifier, options = {}) { this._log = lazy.Log.repository.getLoggerWithMessagePrefix( - "Sqlite.sys.mjs", + "Sqlite.jsm", `Connection ${identifier}: ` ); this._log.manageLevelFromPref("toolkit.sqlitejsm.loglevel"); @@ -391,7 +391,7 @@ ConnectionData.prototype = Object.freeze({ * * @param {string} name A human-readable name for the ongoing operation, used * for logging and debugging purposes. - * @param {function(db)} task A function that takes as argument a Sqlite.sys.mjs + * @param {function(db)} task A function that takes as argument a Sqlite.jsm * db and returns a Promise. */ executeBeforeShutdown(parent, name, task) { @@ -541,7 +541,7 @@ ConnectionData.prototype = Object.freeze({ // function and asyncClose() finishing. See also bug 726990. this._open = false; - // We must always close the connection at the Sqlite.sys.mjs-level, not + // We must always close the connection at the Sqlite.jsm-level, not // necessarily at the mozStorage-level. let markAsClosed = () => { this._log.debug("Closed"); @@ -691,7 +691,7 @@ ConnectionData.prototype = Object.freeze({ } catch (ex) { // Unfortunately, if we are wrapping an existing connection, a // transaction could have been started by a client of the same - // connection that doesn't use Sqlite.sys.mjs (e.g. C++ consumer). + // connection that doesn't use Sqlite.jsm (e.g. C++ consumer). // The best we can do is proceed without a transaction and hope // things won't break. if (wrappedConnections.has(this._identifier)) { @@ -1093,7 +1093,7 @@ ConnectionData.prototype = Object.freeze({ */ function openConnection(options) { let log = lazy.Log.repository.getLoggerWithMessagePrefix( - "Sqlite.sys.mjs", + "Sqlite.jsm", `ConnectionOpener: ` ); log.manageLevelFromPref("toolkit.sqlitejsm.loglevel"); @@ -1104,8 +1104,7 @@ function openConnection(options) { if (isClosed) { throw new Error( - "Sqlite.sys.mjs has been shutdown. Cannot open connection to: " + - options.path + "Sqlite.jsm has been shutdown. Cannot open connection to: " + options.path ); } @@ -1240,7 +1239,7 @@ function openConnection(options) { */ function cloneStorageConnection(options) { let log = lazy.Log.repository.getLoggerWithMessagePrefix( - "Sqlite.sys.mjs", + "Sqlite.jsm", `ConnectionCloner: ` ); log.manageLevelFromPref("toolkit.sqlitejsm.loglevel"); @@ -1255,7 +1254,7 @@ function cloneStorageConnection(options) { if (isClosed) { throw new Error( - "Sqlite.sys.mjs has been shutdown. Cannot clone connection to: " + + "Sqlite.jsm has been shutdown. Cannot clone connection to: " + source.databaseFile.path ); } @@ -1300,11 +1299,11 @@ function cloneStorageConnection(options) { } /** - * Wraps an existing and open Storage connection with Sqlite.sys.mjs API. The + * Wraps an existing and open Storage connection with Sqlite.jsm API. The * wrapped connection clone has the same underlying characteristics of the * original connection and is returned in form of an OpenedConnection handle. * - * Clients are responsible for closing both the Sqlite.sys.mjs wrapper and the + * Clients are responsible for closing both the Sqlite.jsm wrapper and the * underlying mozStorage connection. * * The following parameters can control the wrapped connection: @@ -1319,7 +1318,7 @@ function cloneStorageConnection(options) { */ function wrapStorageConnection(options) { let log = lazy.Log.repository.getLoggerWithMessagePrefix( - "Sqlite.sys.mjs", + "Sqlite.jsm", `ConnectionCloner: ` ); log.manageLevelFromPref("toolkit.sqlitejsm.loglevel"); @@ -1331,7 +1330,7 @@ function wrapStorageConnection(options) { if (isClosed) { throw new Error( - "Sqlite.sys.mjs has been shutdown. Cannot wrap connection to: " + + "Sqlite.jsm has been shutdown. Cannot wrap connection to: " + connection.databaseFile.path ); } @@ -1444,13 +1443,13 @@ OpenedConnection.prototype = Object.freeze({ /** * Returns a handle to the underlying `mozIStorageAsyncConnection`. This is - * ⚠️ **extremely unsafe** ⚠️ because `Sqlite.sys.mjs` continues to manage the + * ⚠️ **extremely unsafe** ⚠️ because `Sqlite.jsm` continues to manage the * connection's lifecycle, including transactions and shutdown blockers. * Misusing the raw connection can easily lead to data loss, memory leaks, * and errors. * * Consumers of the raw connection **must not** close or re-wrap it, - * and should not run statements concurrently with `Sqlite.sys.mjs`. + * and should not run statements concurrently with `Sqlite.jsm`. * * It's _much_ safer to open a `mozIStorage{Async}Connection` yourself, * and access it from JavaScript via `Sqlite.wrapStorageConnection`. @@ -1645,7 +1644,7 @@ OpenedConnection.prototype = Object.freeze({ * Whether a transaction is currently in progress. * * Note that this is true if a transaction is active on the connection, - * regardless of whether it was started by `Sqlite.sys.mjs` or another consumer. + * regardless of whether it was started by `Sqlite.jsm` or another consumer. * See the explanation above `mozIStorageConnection.transactionInProgress` for * why this distinction matters. */ diff --git a/toolkit/modules/docs/AsyncShutdown.rst b/toolkit/modules/docs/AsyncShutdown.rst index bf1af6f0930e9..74dad1540d9f7 100644 --- a/toolkit/modules/docs/AsyncShutdown.rst +++ b/toolkit/modules/docs/AsyncShutdown.rst @@ -161,8 +161,8 @@ Example 4: A service with both internal and external dependencies let { AsyncShutdown } = ChromeUtils.import( "resource://gre/modules/AsyncShutdown.jsm" ); - let { PromiseUtils } = ChromeUtils.importESModule( - "resource://gre/modules/PromiseUtils.sys.mjs" + let { PromiseUtils } = ChromeUtils.import( + "resource://gre/modules/PromiseUtils.jsm" ); this.exports = ["FooService2"]; diff --git a/toolkit/modules/nsIE10SUtils.idl b/toolkit/modules/nsIE10SUtils.idl index 9bc1cb075f9b2..cda2ff7b5bae6 100644 --- a/toolkit/modules/nsIE10SUtils.idl +++ b/toolkit/modules/nsIE10SUtils.idl @@ -11,7 +11,7 @@ interface nsIURI; /** * C++ exposed interface for the `E10SUtils` object from the - * `resource://gre/modules/E10SUtils.sys.mjs` module. + * `resource://gre/modules/E10SUtils.jsm` module. */ [scriptable, uuid(1e18680e-052d-4509-a17e-678f5c495e02)] interface nsIE10SUtils : nsISupports { diff --git a/toolkit/modules/tests/browser/browser_CreditCard.js b/toolkit/modules/tests/browser/browser_CreditCard.js index 9a94585ca6afb..d0564031b2074 100644 --- a/toolkit/modules/tests/browser/browser_CreditCard.js +++ b/toolkit/modules/tests/browser/browser_CreditCard.js @@ -26,6 +26,13 @@ add_setup(function() { registerCleanupFunction(async () => { OSKeyStore.__defineGetter__("isLoggedIn", oldGetters.isLoggedIn); await OSKeyStoreTestUtils.cleanup(); + + // CreditCard.jsm, OSKeyStore.jsm, and OSKeyStoreTestUtils.jsm are imported + // into the global scope -- the window -- above. If they're not deleted, + // they outlive the test and are reported as a leak. + delete window.OSKeyStore; + delete window.CreditCard; + delete window.OSKeyStoreTestUtils; }); }); diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js index e85e93c260e85..26716ac28b635 100644 --- a/toolkit/modules/tests/browser/browser_Troubleshoot.js +++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js @@ -45,7 +45,7 @@ function test() { } registerCleanupFunction(function() { - // Troubleshoot.sys.mjs is imported into the global scope -- the window -- above. + // Troubleshoot.jsm is imported into the global scope -- the window -- above. // If it's not deleted, it outlives the test and is reported as a leak. delete window.Troubleshoot; }); diff --git a/toolkit/modules/tests/browser/browser_web_channel.js b/toolkit/modules/tests/browser/browser_web_channel.js index 90b378f0a80f9..643c92fffbc50 100644 --- a/toolkit/modules/tests/browser/browser_web_channel.js +++ b/toolkit/modules/tests/browser/browser_web_channel.js @@ -502,7 +502,7 @@ var gTests = [ desc: "WebChannel errors handling the message are delivered back to content", async run() { - const ERRNO_UNKNOWN_ERROR = 999; // WebChannel.sys.mjs doesn't export this. + const ERRNO_UNKNOWN_ERROR = 999; // WebChannel.jsm doesn't export this. // The channel where we purposely fail responding to a command. let channel = new WebChannel("error", Services.io.newURI(HTTP_PATH)); @@ -542,7 +542,7 @@ var gTests = [ desc: "WebChannel errors due to an invalid channel are delivered back to content", async run() { - const ERRNO_NO_SUCH_CHANNEL = 2; // WebChannel.sys.mjs doesn't export this. + const ERRNO_NO_SUCH_CHANNEL = 2; // WebChannel.jsm doesn't export this. // The channel where we see the response when the content sees the error let echoChannel = new WebChannel("echo", Services.io.newURI(HTTP_PATH)); diff --git a/toolkit/modules/tests/xpcshell/TestIntegration.jsm b/toolkit/modules/tests/xpcshell/TestIntegration.jsm index 6716597934b19..7bc801c8e5f45 100644 --- a/toolkit/modules/tests/xpcshell/TestIntegration.jsm +++ b/toolkit/modules/tests/xpcshell/TestIntegration.jsm @@ -2,7 +2,7 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ /* - * Internal module used to test the generation of Integration.sys.mjs getters. + * Internal module used to test the generation of Integration.jsm getters. */ "use strict"; diff --git a/toolkit/modules/tests/xpcshell/test_DeferredTask.js b/toolkit/modules/tests/xpcshell/test_DeferredTask.js index 1ecfd79633f4b..ca0ca6e9a88bd 100644 --- a/toolkit/modules/tests/xpcshell/test_DeferredTask.js +++ b/toolkit/modules/tests/xpcshell/test_DeferredTask.js @@ -2,7 +2,7 @@ http://creativecommons.org/publicdomain/zero/1.0/ */ /** - * This file tests the DeferredTask.sys.mjs module. + * This file tests the DeferredTask.jsm module. */ // Globals diff --git a/toolkit/modules/tests/xpcshell/test_Integration.js b/toolkit/modules/tests/xpcshell/test_Integration.js index 324dca5384e3b..e1cb40ddfd53f 100644 --- a/toolkit/modules/tests/xpcshell/test_Integration.js +++ b/toolkit/modules/tests/xpcshell/test_Integration.js @@ -2,7 +2,7 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ /* - * Tests the Integration.sys.mjs module. + * Tests the Integration.jsm module. */ "use strict"; diff --git a/toolkit/modules/tests/xpcshell/test_PromiseUtils.js b/toolkit/modules/tests/xpcshell/test_PromiseUtils.js index c0de1c243b38e..cdad06a565355 100644 --- a/toolkit/modules/tests/xpcshell/test_PromiseUtils.js +++ b/toolkit/modules/tests/xpcshell/test_PromiseUtils.js @@ -14,7 +14,7 @@ const { PromiseTestUtils } = ChromeUtils.import( "resource://testing-common/PromiseTestUtils.jsm" ); -// Tests for PromiseUtils.sys.mjs +// Tests for PromiseUtils.jsm // Tests for PromiseUtils.defer() diff --git a/toolkit/modules/tests/xpcshell/test_Region.js b/toolkit/modules/tests/xpcshell/test_Region.js index 7adc3505fb75a..07af10ed53a10 100644 --- a/toolkit/modules/tests/xpcshell/test_Region.js +++ b/toolkit/modules/tests/xpcshell/test_Region.js @@ -27,7 +27,7 @@ const histogram = Services.telemetry.getHistogramById( "SEARCH_SERVICE_COUNTRY_FETCH_RESULT" ); -// Region.sys.mjs will call init() on startup and sent a background +// Region.jsm will call init() on startup and sent a background // task to fetch the region, ensure we have completed this before // running the rest of the tests. add_task(async function test_startup() { diff --git a/toolkit/modules/tests/xpcshell/test_osKeyStore.js b/toolkit/modules/tests/xpcshell/test_osKeyStore.js index 0c58dbaaf6379..273fe1a5ca8e8 100644 --- a/toolkit/modules/tests/xpcshell/test_osKeyStore.js +++ b/toolkit/modules/tests/xpcshell/test_osKeyStore.js @@ -1,5 +1,5 @@ /** - * Tests of OSKeyStore.sys.mjs + * Tests of OSKeyStore.jsm */ "use strict"; diff --git a/toolkit/modules/tests/xpcshell/test_sqlite.js b/toolkit/modules/tests/xpcshell/test_sqlite.js index d13d95a6853bc..25b6e2181a7ef 100644 --- a/toolkit/modules/tests/xpcshell/test_sqlite.js +++ b/toolkit/modules/tests/xpcshell/test_sqlite.js @@ -38,7 +38,7 @@ function sleep(ms) { }); } -// When testing finalization, use this to tell Sqlite.sys.mjs to not throw +// When testing finalization, use this to tell Sqlite.jsm to not throw // an uncatchable `Promise.reject` function failTestsOnAutoClose(enabled) { Sqlite.failTestsOnAutoClose(enabled); diff --git a/toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js b/toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js index 100cc4050bb66..b6e97a30fe870 100644 --- a/toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js +++ b/toolkit/modules/tests/xpcshell/test_sqlite_shutdown.js @@ -56,10 +56,10 @@ function sleep(ms) { } // -// ----------- Don't add a test after this one, as it shuts down Sqlite.sys.mjs +// ----------- Don't add a test after this one, as it shuts down Sqlite.jsm // add_task(async function test_shutdown_clients() { - info("Ensuring that Sqlite.sys.mjs doesn't shutdown before its clients"); + info("Ensuring that Sqlite.jsm doesn't shutdown before its clients"); let assertions = []; @@ -89,14 +89,14 @@ add_task(async function test_shutdown_clients() { async function() { let db = await getDummyDatabase("opened during shutdown"); dbOpened = true; - db.close().then(() => (dbClosed = true)); // Don't wait for this task to complete, Sqlite.sys.mjs must wait automatically + db.close().then(() => (dbClosed = true)); // Don't wait for this task to complete, Sqlite.jsm must wait automatically } ); assertions.push({ name: "dbOpened", value: () => dbOpened }); assertions.push({ name: "dbClosed", value: () => dbClosed }); - info("Now shutdown Sqlite.sys.mjs synchronously"); + info("Now shutdown Sqlite.jsm synchronously"); Services.prefs.setBoolPref("toolkit.asyncshutdown.testing", true); AsyncShutdown.profileBeforeChange._trigger(); Services.prefs.clearUserPref("toolkit.asyncshutdown.testing"); @@ -114,5 +114,5 @@ add_task(async function test_shutdown_clients() { exn = ex; } Assert.ok(!!exn); - Assert.ok(exn.message.includes("Sqlite.sys.mjs has been shutdown")); + Assert.ok(exn.message.includes("Sqlite.jsm has been shutdown")); }); diff --git a/toolkit/modules/tests/xpcshell/test_timer.js b/toolkit/modules/tests/xpcshell/test_timer.js index 421244c76951b..dba81c3135748 100644 --- a/toolkit/modules/tests/xpcshell/test_timer.js +++ b/toolkit/modules/tests/xpcshell/test_timer.js @@ -3,7 +3,7 @@ "use strict"; -// Tests exports from Timer.sys.mjs +// Tests exports from Timer.jsm var imported = ChromeUtils.importESModule( "resource://gre/modules/Timer.sys.mjs" diff --git a/toolkit/mozapps/update/BackgroundTask_backgroundupdate.sys.mjs b/toolkit/mozapps/update/BackgroundTask_backgroundupdate.sys.mjs index 4cb8eb8ee9fa3..34df7165c2608 100644 --- a/toolkit/mozapps/update/BackgroundTask_backgroundupdate.sys.mjs +++ b/toolkit/mozapps/update/BackgroundTask_backgroundupdate.sys.mjs @@ -37,7 +37,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { ); let consoleOptions = { // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: "app.update.background.loglevel", prefix: "BackgroundUpdate", @@ -198,7 +198,7 @@ export async function runBackgroundTask(commandLine) { lazy.log.error(`${SLUG}: backgroundupdate`); // Help debugging. This is a pared down version of - // `dataProviders.application` in `Troubleshoot.sys.mjs`. When adding to this + // `dataProviders.application` in `Troubleshoot.jsm`. When adding to this // debugging data, try to follow the form from that module. let data = { name: Services.appinfo.name, diff --git a/toolkit/mozapps/update/BackgroundUpdate.jsm b/toolkit/mozapps/update/BackgroundUpdate.jsm index a58c9fd3feac8..92de46a493fe4 100644 --- a/toolkit/mozapps/update/BackgroundUpdate.jsm +++ b/toolkit/mozapps/update/BackgroundUpdate.jsm @@ -38,7 +38,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => { ); let consoleOptions = { // tip: set maxLogLevel to "debug" and use log.debug() to create detailed - // messages during development. See LOG_LEVELS in Console.sys.mjs for details. + // messages during development. See LOG_LEVELS in Console.jsm for details. maxLogLevel: "error", maxLogLevelPref: "app.update.background.loglevel", prefix: "BackgroundUpdate", @@ -661,7 +661,7 @@ var BackgroundUpdate = { // Persist. snapshot.saveSoon(); - // Continue persisting periodically. `JSONFile.sys.mjs` will also persist one + // Continue persisting periodically. `JSONFile.jsm` will also persist one // last time before shutdown. this._targetingSnapshottingTimer = Cc[ "@mozilla.org/timer;1" diff --git a/toolkit/mozapps/update/docs/SettingUpAnUpdateServer.rst b/toolkit/mozapps/update/docs/SettingUpAnUpdateServer.rst index 676e4072bda2d..23917a260db6c 100644 --- a/toolkit/mozapps/update/docs/SettingUpAnUpdateServer.rst +++ b/toolkit/mozapps/update/docs/SettingUpAnUpdateServer.rst @@ -190,7 +190,7 @@ update directory: .. code:: - ChromeUtils.importESModules("resource://gre/modules/FileUtils.sys.mjs").FileUtils.getDir("UpdRootD", [], false).path + ChromeUtils.import("resource://gre/modules/FileUtils.jsm").FileUtils.getDir("UpdRootD", [], false).path Once you have determined the update directory, close Firefox, browse to the directory and remove the subdirectory called ``updates``. diff --git a/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py b/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py index 7092d68d600cd..15f064697ca38 100644 --- a/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py +++ b/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py @@ -46,9 +46,7 @@ def setUpBrowser(self): Services.prefs.setIntPref("app.update.noWindowAutoRestart.delayMs", 1000); Services.prefs.clearUserPref("testing.no_window_update_restart.silent_restart_env"); - let { UpdateUtils } = ChromeUtils.importESModule( - "resource://gre/modules/UpdateUtils.sys.mjs" - ); + let { UpdateUtils } = ChromeUtils.import("resource://gre/modules/UpdateUtils.jsm"); let origAppUpdateAuto = await UpdateUtils.getAppUpdateAutoEnabled(); await UpdateUtils.setAppUpdateAutoEnabled(true); @@ -102,9 +100,7 @@ def tearDownBrowser(self): Services.prefs.clearUserPref("app.update.noWindowAutoRestart.delayMs"); Services.prefs.clearUserPref("testing.no_window_update_restart.silent_restart_env"); - let { UpdateUtils } = ChromeUtils.importESModule( - "resource://gre/modules/UpdateUtils.sys.mjs" - ); + let { UpdateUtils } = ChromeUtils.import("resource://gre/modules/UpdateUtils.jsm"); await UpdateUtils.setAppUpdateAutoEnabled(origAppUpdateAuto); })().then(resolve); """, @@ -167,9 +163,7 @@ def resetUpdate(self): let { UpdateListener } = ChromeUtils.import("resource://gre/modules/UpdateListener.jsm"); UpdateListener.reset(); - let { AppMenuNotifications } = ChromeUtils.importESModule( - "resource://gre/modules/AppMenuNotifications.sys.mjs" - ); + let { AppMenuNotifications } = ChromeUtils.import("resource://gre/modules/AppMenuNotifications.jsm"); AppMenuNotifications.removeNotification(/.*/); // Remove old update files so that they don't interfere with tests.