diff --git a/toolkit/actors/AutoCompleteParent.sys.mjs b/toolkit/actors/AutoCompleteParent.sys.mjs index 27f3dcbe075d..611677a84f35 100644 --- a/toolkit/actors/AutoCompleteParent.sys.mjs +++ b/toolkit/actors/AutoCompleteParent.sys.mjs @@ -503,7 +503,8 @@ export class AutoCompleteParent extends JSWindowActorParent { * that the open popup should be focused. */ requestFocus() { - // Bug 1582722 - See the response in AutoCompleteChild.jsm for why this disabled. + // Bug 1582722 - See the response in AutoCompleteChild.sys.mjs for why this + // disabled. /* if (this.openedPopup) { this.sendAsyncMessage("FormAutoComplete:Focus"); diff --git a/toolkit/actors/PictureInPictureChild.sys.mjs b/toolkit/actors/PictureInPictureChild.sys.mjs index b1ed71e2e8a1..2a415df32db6 100644 --- a/toolkit/actors/PictureInPictureChild.sys.mjs +++ b/toolkit/actors/PictureInPictureChild.sys.mjs @@ -1812,7 +1812,7 @@ export class PictureInPictureChild extends JSWindowActorChild { * 4) all active cues with VTTCue.line integer have VTTCue.snapToLines = true * 5) all active cues with VTTCue.line percentage have VTTCue.snapToLines = false * - * vtt.jsm currently sets snapToLines to false if line is a percentage value, but + * vtt.sys.mjs currently sets snapToLines to false if line is a percentage value, but * cues are still ordered by line. In most cases, snapToLines is set to true by default, * unless intentionally overridden. * @param allCuesArray {Array} array of active cues diff --git a/toolkit/actors/SelectChild.sys.mjs b/toolkit/actors/SelectChild.sys.mjs index 2e3021733ec5..1bc80001ae13 100644 --- a/toolkit/actors/SelectChild.sys.mjs +++ b/toolkit/actors/SelectChild.sys.mjs @@ -15,7 +15,7 @@ ChromeUtils.defineESModuleGetters(lazy, { const kStateActive = 0x00000001; // ElementState::ACTIVE const kStateHover = 0x00000004; // ElementState::HOVER -// Duplicated in SelectParent.jsm +// Duplicated in SelectParent.sys.mjs // Please keep these lists in sync. const SUPPORTED_OPTION_OPTGROUP_PROPERTIES = [ "direction", diff --git a/toolkit/actors/SelectParent.sys.mjs b/toolkit/actors/SelectParent.sys.mjs index 6d14807e448e..5382b35ab3a2 100644 --- a/toolkit/actors/SelectParent.sys.mjs +++ b/toolkit/actors/SelectParent.sys.mjs @@ -32,7 +32,7 @@ const PROPERTIES_RESET_WHEN_ACTIVE = [ "text-shadow", ]; -// Duplicated in SelectChild.jsm +// Duplicated in SelectChild.sys.mjs // Please keep these lists in sync. const SUPPORTED_OPTION_OPTGROUP_PROPERTIES = [ "direction", diff --git a/toolkit/components/asyncshutdown/AsyncShutdown.sys.mjs b/toolkit/components/asyncshutdown/AsyncShutdown.sys.mjs index 4f0adc092a68..4577fa49a49c 100644 --- a/toolkit/components/asyncshutdown/AsyncShutdown.sys.mjs +++ b/toolkit/components/asyncshutdown/AsyncShutdown.sys.mjs @@ -335,8 +335,7 @@ function getOrigin(topFrame, filename = null, lineNumber = null, stack = null) { lineNumber = frame ? frame.lineNumber : 0; } if (stack == null) { - // Now build the rest of the stack as a string, using Task.jsm's rewriting - // to ensure that we do not lose information at each call to `Task.spawn`. + // Now build the rest of the stack as a string. stack = []; while (frame != null) { stack.push(frame.filename + ":" + frame.name + ":" + frame.lineNumber); diff --git a/toolkit/components/cleardata/PrincipalsCollector.sys.mjs b/toolkit/components/cleardata/PrincipalsCollector.sys.mjs index 2b5917c6ce44..e4f5e827f62e 100644 --- a/toolkit/components/cleardata/PrincipalsCollector.sys.mjs +++ b/toolkit/components/cleardata/PrincipalsCollector.sys.mjs @@ -17,7 +17,7 @@ let logConsole; function log(msg) { if (!logConsole) { logConsole = console.createInstance({ - prefix: "** PrincipalsCollector.jsm", + prefix: "PrincipalsCollector", maxLogLevelPref: "browser.sanitizer.loglevel", }); } diff --git a/toolkit/components/cleardata/ServiceWorkerCleanUp.sys.mjs b/toolkit/components/cleardata/ServiceWorkerCleanUp.sys.mjs index 1c49b2be08b9..b513e47aba55 100644 --- a/toolkit/components/cleardata/ServiceWorkerCleanUp.sys.mjs +++ b/toolkit/components/cleardata/ServiceWorkerCleanUp.sys.mjs @@ -15,7 +15,7 @@ XPCOMUtils.defineLazyServiceGetter( if (Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_CONTENT) { throw new Error( - "ServiceWorkerCleanUp.jsm can only be used in the parent process" + "ServiceWorkerCleanUp.sys.mjs can only be used in the parent process" ); } diff --git a/toolkit/components/cleardata/nsIClearDataService.idl b/toolkit/components/cleardata/nsIClearDataService.idl index 0dff281dbe63..ea17059bbeb3 100644 --- a/toolkit/components/cleardata/nsIClearDataService.idl +++ b/toolkit/components/cleardata/nsIClearDataService.idl @@ -140,7 +140,7 @@ interface nsIClearDataService : nsISupports * whose base domain does not have any storage associated with it. * * The principals to be considered will need to be passed by the API consumer. - * It is recommended to use PrincipalsCollector.jsm for that. + * It is recommended to use PrincipalsCollector.sys.mjs for that. * * @param aPrincipalsWithStorage principals to be excluded from clearing * @param aFrom microseconds from the epoch diff --git a/toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs b/toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs index fefe162ea0b1..738f8743eea3 100644 --- a/toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs +++ b/toolkit/components/contextualidentity/ContextualIdentityService.sys.mjs @@ -90,7 +90,7 @@ _ContextualIdentityService.prototype = { name: "userContextIdInternal.thumbnail", accessKey: "", }, - // This userContextId is used by ExtensionStorageIDB.jsm to create an IndexedDB database + // This userContextId is used by ExtensionStorageIDB.sys.mjs to create an IndexedDB database // opened with the extension principal but not directly accessible to the extension code // (do not change the userContextId assigned here, otherwise the installed extensions will // not be able to access the data previously stored with the browser.storage.local API). diff --git a/toolkit/components/crashes/CrashManager.in.sys.mjs b/toolkit/components/crashes/CrashManager.in.sys.mjs index 253f70d07edf..9e89c81d91dc 100644 --- a/toolkit/components/crashes/CrashManager.in.sys.mjs +++ b/toolkit/components/crashes/CrashManager.in.sys.mjs @@ -24,8 +24,7 @@ const AGGREGATE_STARTUP_DELAY_MS = 57000; const MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000; // Converts Date to days since UNIX epoch. -// This was copied from /services/metrics.storage.jsm. The implementation -// does not account for leap seconds. +// The implementation does not account for leap seconds. export function dateToDays(date) { return Math.floor(date.getTime() / MILLISECONDS_IN_DAY); } diff --git a/toolkit/components/extensions/ConduitsChild.sys.mjs b/toolkit/components/extensions/ConduitsChild.sys.mjs index c5774ab39c67..598804f74a2a 100644 --- a/toolkit/components/extensions/ConduitsChild.sys.mjs +++ b/toolkit/components/extensions/ConduitsChild.sys.mjs @@ -4,7 +4,7 @@ /** * This @file implements the child side of Conduits, an abstraction over - * Fission IPC for extension API subject. See {@link ConduitsParent.jsm} + * Fission IPC for extension API subject. See {@link ConduitsParent.sys.mjs} * for more details about the overall design. * * @typedef {object} MessageData diff --git a/toolkit/components/extensions/Extension.sys.mjs b/toolkit/components/extensions/Extension.sys.mjs index e8e8b27ad264..de6d4c8bfd51 100644 --- a/toolkit/components/extensions/Extension.sys.mjs +++ b/toolkit/components/extensions/Extension.sys.mjs @@ -3205,7 +3205,7 @@ export class Extension extends ExtensionData { // Extended serialized data which is only needed in the extensions process, // and is never deserialized in web content processes. - // Keep in sync with BrowserExtensionContent in ExtensionChild.jsm + // Keep in sync with BrowserExtensionContent in ExtensionChild.sys.mjs serializeExtended() { return { backgroundScripts: this.backgroundScripts, diff --git a/toolkit/components/extensions/ExtensionChild.sys.mjs b/toolkit/components/extensions/ExtensionChild.sys.mjs index 63c1bedec1f2..70774db3957c 100644 --- a/toolkit/components/extensions/ExtensionChild.sys.mjs +++ b/toolkit/components/extensions/ExtensionChild.sys.mjs @@ -8,7 +8,7 @@ * This file handles addon logic that is independent of the chrome process and * may run in all web content and extension processes. * - * Don't put contentscript logic here, use ExtensionContent.jsm instead. + * Don't put contentscript logic here, use ExtensionContent.sys.mjs instead. */ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; @@ -397,7 +397,7 @@ class BrowserExtensionContent extends EventEmitter { this.optionalPermissions = policy.optionalPermissions; if (WebExtensionPolicy.isExtensionProcess) { - // Keep in sync with serializeExtended in Extension.jsm + // Keep in sync with serializeExtended in Extension.sys.mjs let ed = this.getSharedData("extendedData"); this.backgroundScripts = ed.backgroundScripts; this.backgroundWorkerScript = ed.backgroundWorkerScript; @@ -727,8 +727,8 @@ class ChildLocalAPIImplementation extends LocalAPIImplementation { // We create one instance of this class for every extension context that // needs to use remote APIs. It uses the the JSWindowActor and -// JSProcessActor Conduits actors (see ConduitsChild.jsm) to communicate -// with the ParentAPIManager singleton in ExtensionParent.jsm. +// JSProcessActor Conduits actors (see ConduitsChild.sys.mjs) to communicate +// with the ParentAPIManager singleton in ExtensionParent.sys.mjs. // It handles asynchronous function calls as well as event listeners. class ChildAPIManager { constructor(context, messageManager, localAPICan, contextData) { diff --git a/toolkit/components/extensions/ExtensionCommon.sys.mjs b/toolkit/components/extensions/ExtensionCommon.sys.mjs index 1460f4d2018b..512d1444a526 100644 --- a/toolkit/components/extensions/ExtensionCommon.sys.mjs +++ b/toolkit/components/extensions/ExtensionCommon.sys.mjs @@ -7,7 +7,7 @@ /** * This module contains utilities and base classes for logic which is * common between the parent and child process, and in particular - * between ExtensionParent.jsm and ExtensionChild.jsm. + * between ExtensionParent.sys.mjs and ExtensionChild.sys.mjs. */ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; @@ -1033,7 +1033,7 @@ class BaseContext { /** * An object that runs the implementation of a schema API. Instantiations of - * this interfaces are used by Schemas.jsm. + * this interfaces are used by Schemas.sys.mjs. * * @interface */ @@ -1865,7 +1865,7 @@ class SchemaAPIManager extends EventEmitter { { wantXrays: false, wantGlobalProperties: ["ChromeUtils"], - sandboxName: `Namespace of ext-*.js scripts for ${this.processType} (from: resource://gre/modules/ExtensionCommon.jsm)`, + sandboxName: `Namespace of ext-*.js scripts for ${this.processType} (from: resource://gre/modules/ExtensionCommon.sys.mjs)`, } ); diff --git a/toolkit/components/extensions/ExtensionContent.sys.mjs b/toolkit/components/extensions/ExtensionContent.sys.mjs index af086e732a10..015d1bc7c691 100644 --- a/toolkit/components/extensions/ExtensionContent.sys.mjs +++ b/toolkit/components/extensions/ExtensionContent.sys.mjs @@ -787,7 +787,7 @@ var contentScripts = new DefaultWeakMap(matcher => { * An execution context for semi-privileged extension content scripts. * * This is the child side of the ContentScriptContextParent class - * defined in ExtensionParent.jsm. + * defined in ExtensionParent.sys.mjs. */ class ContentScriptContextChild extends BaseContext { constructor(extension, contentWindow) { diff --git a/toolkit/components/extensions/ExtensionDNR.sys.mjs b/toolkit/components/extensions/ExtensionDNR.sys.mjs index b23eea140da0..d18856a2b818 100644 --- a/toolkit/components/extensions/ExtensionDNR.sys.mjs +++ b/toolkit/components/extensions/ExtensionDNR.sys.mjs @@ -1913,7 +1913,7 @@ const NetworkIntegration = { maxEvaluatedRulesCount: 0, register() { - // We register via WebRequest.jsm to ensure predictable ordering of DNR and + // We register via WebRequest.sys.mjs to ensure predictable ordering of DNR and // WebRequest behavior. lazy.WebRequest.setDNRHandlingEnabled(true); }, diff --git a/toolkit/components/extensions/ExtensionPageChild.sys.mjs b/toolkit/components/extensions/ExtensionPageChild.sys.mjs index 7914268b708e..17c208572b21 100644 --- a/toolkit/components/extensions/ExtensionPageChild.sys.mjs +++ b/toolkit/components/extensions/ExtensionPageChild.sys.mjs @@ -299,7 +299,7 @@ class ExtensionPageContextChild extends ExtensionBaseContextChild { * APIs (provided that the correct permissions have been requested). * * This is the child side of the ExtensionPageContextParent class - * defined in ExtensionParent.jsm. + * defined in ExtensionParent.sys.mjs. * * @param {BrowserExtensionContent} extension This context's owner. * @param {object} params diff --git a/toolkit/components/extensions/ExtensionParent.sys.mjs b/toolkit/components/extensions/ExtensionParent.sys.mjs index 6f31341875a1..b4812a702a2a 100644 --- a/toolkit/components/extensions/ExtensionParent.sys.mjs +++ b/toolkit/components/extensions/ExtensionParent.sys.mjs @@ -7,7 +7,7 @@ /** * This module contains code for managing APIs that need to run in the * parent process, and handles the parent side of operations that need - * to be proxied from ExtensionChild.jsm. + * to be proxied from ExtensionChild.sys.mjs. */ import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs"; @@ -481,7 +481,7 @@ GlobalManager = { }; /** - * The proxied parent side of a context in ExtensionChild.jsm, for the + * The proxied parent side of a context in ExtensionChild.sys.mjs, for the * parent side of a proxied API. */ class ProxyContextParent extends BaseContext { @@ -685,14 +685,14 @@ class ProxyContextParent extends BaseContext { /** * The parent side of proxied API context for extension content script - * running in ExtensionContent.jsm. + * running in ExtensionContent.sys.mjs. */ class ContentScriptContextParent extends ProxyContextParent {} /** * The parent side of proxied API context for extension page, such as a * background script, a tab page, or a popup, running in - * ExtensionChild.jsm. + * ExtensionChild.sys.mjs. */ class ExtensionPageContextParent extends ProxyContextParent { constructor(envType, extension, params, browsingContext) { @@ -741,7 +741,7 @@ class ExtensionPageContextParent extends ProxyContextParent { /** * The parent side of proxied API context for devtools extension page, such as a - * devtools pages and panels running in ExtensionChild.jsm. + * devtools pages and panels running in ExtensionChild.sys.mjs. */ class DevToolsExtensionPageContextParent extends ExtensionPageContextParent { constructor(...params) { diff --git a/toolkit/components/extensions/ExtensionProcessScript.sys.mjs b/toolkit/components/extensions/ExtensionProcessScript.sys.mjs index 5032542d12b0..93746cb0caf8 100644 --- a/toolkit/components/extensions/ExtensionProcessScript.sys.mjs +++ b/toolkit/components/extensions/ExtensionProcessScript.sys.mjs @@ -325,7 +325,7 @@ ExtensionManager = { if (!policy) { break; } - // In the parent process, Extension.jsm updates the policy. + // In the parent process, Extension.sys.mjs updates the policy. if (lazy.isContentProcess) { lazy.ExtensionCommon.updateAllowedOrigins( policy, diff --git a/toolkit/components/extensions/ExtensionTestCommon.sys.mjs b/toolkit/components/extensions/ExtensionTestCommon.sys.mjs index 94cb801cc5ed..701a85d97bbf 100644 --- a/toolkit/components/extensions/ExtensionTestCommon.sys.mjs +++ b/toolkit/components/extensions/ExtensionTestCommon.sys.mjs @@ -100,7 +100,7 @@ export class MockExtension { this._extensionPromise.then(extension => { extension.on(...args); }); - // Extension.jsm emits a "startup" event on |extension| before emitting the + // Extension.sys.mjs emits a "startup" event on |extension| before emitting the // "startup" event on |apiManager|. Trigger the "startup" event anyway, to // make sure that the MockExtension behaves like an Extension with regards // to the startup event. diff --git a/toolkit/components/extensions/ProxyChannelFilter.sys.mjs b/toolkit/components/extensions/ProxyChannelFilter.sys.mjs index f33bd04b0349..444602f2fa76 100644 --- a/toolkit/components/extensions/ProxyChannelFilter.sys.mjs +++ b/toolkit/components/extensions/ProxyChannelFilter.sys.mjs @@ -286,8 +286,8 @@ export class ProxyChannelFilter { ); } - // Originally duplicated from WebRequest.jsm with small changes. Keep this - // in sync with WebRequest.jsm as well as parent/ext-webRequest.js when + // Originally duplicated from WebRequest.sys.mjs with small changes. Keep this + // in sync with WebRequest.sys.mjs as well as parent/ext-webRequest.js when // apropiate. getRequestData(channel, extraData) { let originAttributes = channel.loadInfo?.originAttributes; diff --git a/toolkit/components/extensions/child/ext-storage.js b/toolkit/components/extensions/child/ext-storage.js index 4c1afff070b7..3d71a1cd60eb 100644 --- a/toolkit/components/extensions/child/ext-storage.js +++ b/toolkit/components/extensions/child/ext-storage.js @@ -185,7 +185,7 @@ this.storage = class extends ExtensionAPI { return items; } // If we got here, then `items` is an object generated by `ObjectType`'s - // `normalize` method from Schemas.jsm. The object returned by `normalize` + // `normalize` method from Schemas.sys.mjs. The object returned by `normalize` // lives in this compartment, while the values live in compartment of // `context.contentWindow`. The `sanitize` method runs with the principal // of `context`, so we cannot just use `ExtensionStorage.sanitize` because diff --git a/toolkit/components/extensions/child/ext-test.js b/toolkit/components/extensions/child/ext-test.js index f85845168d0e..3d9835d61f75 100644 --- a/toolkit/components/extensions/child/ext-test.js +++ b/toolkit/components/extensions/child/ext-test.js @@ -248,7 +248,7 @@ this.test = class extends ExtensionAPI { }, assertDeepEq(expected, actual, msg) { - // The bindings generated by Schemas.jsm accepts any input, but the + // The bindings generated by Schemas.sys.mjs accepts any input, but the // WebIDL-generated binding expects a structurally cloneable input. // To ensure consistent behavior regardless of which mechanism was // used, verify that the inputs are structurally cloneable. diff --git a/toolkit/components/extensions/docs/webext-storage.rst b/toolkit/components/extensions/docs/webext-storage.rst index 9b5f2428d686..27ba3ad4d76a 100644 --- a/toolkit/components/extensions/docs/webext-storage.rst +++ b/toolkit/components/extensions/docs/webext-storage.rst @@ -207,7 +207,7 @@ the actual result of the function (also a set of changes to send to observers, b beyond this doc). Ultimately, the `PuntResult` ends up back on the main thread once the call is complete -and arranges to callback the JS implementation, which in turn resolves the promise created in `ExtensionStorageSync.jsm` +and arranges to callback the JS implementation, which in turn resolves the promise created in `ExtensionStorageSync.sys.mjs` End result: ----------- diff --git a/toolkit/components/extensions/docs/webidl_bindings.rst b/toolkit/components/extensions/docs/webidl_bindings.rst index be8c63d0a773..7f7f2e53cbf2 100644 --- a/toolkit/components/extensions/docs/webidl_bindings.rst +++ b/toolkit/components/extensions/docs/webidl_bindings.rst @@ -4,7 +4,7 @@ WebIDL WebExtensions API Bindings While on ``manifest_version: 2`` all the extension globals (extension pages and content scripts) that lives on the main thread and the WebExtensions API bindings can be injected into the extension global from the JS privileged code part of the WebExtensions internals (`See Schemas.inject defined in -Schemas.jsm `_), +Schemas.sys.mjs `_), in ``manifest_version: 3`` the extension will be able to declare a background service worker instead of a background page, and the existing WebExtensions API bindings can't be injected into this new extension global, because it lives off of the main thread. diff --git a/toolkit/components/extensions/parent/ext-browsingData.js b/toolkit/components/extensions/parent/ext-browsingData.js index d06f7a3a1ba8..6d4b721e4f11 100644 --- a/toolkit/components/extensions/parent/ext-browsingData.js +++ b/toolkit/components/extensions/parent/ext-browsingData.js @@ -80,7 +80,7 @@ const clearCache = options => { const clearCookies = async function (options) { let cookieMgr = Services.cookies; - // This code has been borrowed from Sanitizer.jsm. + // This code has been borrowed from Sanitizer.sys.mjs. let yieldCounter = 0; if (options.since || options.hostnames || options.cookieStoreId) { @@ -126,7 +126,7 @@ const clearCookies = async function (options) { } }; -// Ideally we could reuse the logic in Sanitizer.jsm or nsIClearDataService, +// Ideally we could reuse the logic in Sanitizer.sys.mjs or nsIClearDataService, // but this API exposes an ability to wipe data at a much finger granularity // than those APIs. (See also Bug 1531276) async function clearQuotaManager(options, dataType) { diff --git a/toolkit/components/extensions/parent/ext-storage.js b/toolkit/components/extensions/parent/ext-storage.js index 350ca0acfa23..b4ee9ab42254 100644 --- a/toolkit/components/extensions/parent/ext-storage.js +++ b/toolkit/components/extensions/parent/ext-storage.js @@ -192,8 +192,8 @@ this.storage = class extends ExtensionAPIPersistent { extension, onStorageSyncChanged ); - // May be void if ExtensionStorageSyncKinto.jsm was not used. - // ExtensionStorageSync.jsm does not use the context. + // May be void if ExtensionStorageSyncKinto.sys.mjs was not used. + // ExtensionStorageSync.sys.mjs does not use the context. closeCallback?.(); }; } diff --git a/toolkit/components/extensions/storage/webext_storage_bridge/src/lib.rs b/toolkit/components/extensions/storage/webext_storage_bridge/src/lib.rs index 94133ef1e996..c1998fb6367f 100644 --- a/toolkit/components/extensions/storage/webext_storage_bridge/src/lib.rs +++ b/toolkit/components/extensions/storage/webext_storage_bridge/src/lib.rs @@ -16,11 +16,11 @@ //! and `storage.managed`, which is provisioned in a native manifest and //! read-only. //! -//! * `storage.local` is implemented in `ExtensionStorageIDB.jsm`. +//! * `storage.local` is implemented in `ExtensionStorageIDB.sys.mjs`. //! * `storage.sync` is implemented in a Rust component, `webext_storage`. This //! Rust component is vendored in m-c, and exposed to JavaScript via an XPCOM //! API in `webext_storage_bridge` (this crate). Eventually, we'll change -//! `ExtensionStorageSync.jsm` to call the XPCOM API instead of using the +//! `ExtensionStorageSync.sys.mjs` to call the XPCOM API instead of using the //! old Kinto storage adapter. //! * `storage.managed` is implemented directly in `parent/ext-storage.js`. //! diff --git a/toolkit/components/extensions/webidl-api/GenerateWebIDLBindings.py b/toolkit/components/extensions/webidl-api/GenerateWebIDLBindings.py index 3b31bd924da0..6a4a404ac848 100644 --- a/toolkit/components/extensions/webidl-api/GenerateWebIDLBindings.py +++ b/toolkit/components/extensions/webidl-api/GenerateWebIDLBindings.py @@ -139,8 +139,8 @@ def read_json(json_file_path): """ Helper function used to read the WebExtensions API schema JSON files by ignoring the license comment on the top of some of those files. - Same helper as the one available in Schemas.jsm: - https://searchfox.org/mozilla-central/rev/3434a9df60373a997263107e6f124fb164ddebf2/toolkit/components/extensions/Schemas.jsm#70 + Same helper as the one available in Schemas.sys.mjs: + https://searchfox.org/mozilla-central/rev/b60cb73160843adb5a5a3ec8058e75a69b46acf7/toolkit/components/extensions/Schemas.sys.mjs#53 """ with open(json_file_path) as json_file: txt = json_file.read() diff --git a/toolkit/components/extensions/webrequest/WebRequest.sys.mjs b/toolkit/components/extensions/webrequest/WebRequest.sys.mjs index b9c50972143d..bbe044ddeaa2 100644 --- a/toolkit/components/extensions/webrequest/WebRequest.sys.mjs +++ b/toolkit/components/extensions/webrequest/WebRequest.sys.mjs @@ -15,7 +15,7 @@ ChromeUtils.defineESModuleGetters(lazy, { WebRequestUpload: "resource://gre/modules/WebRequestUpload.sys.mjs", }); -// WebRequest.jsm's only consumer is ext-webRequest.js, so we can depend on +// WebRequest.sys.mjs's only consumer is ext-webRequest.js, so we can depend on // the apiManager.global being initialized. ChromeUtils.defineLazyGetter(lazy, "tabTracker", () => { return lazy.ExtensionParent.apiManager.global.tabTracker; diff --git a/toolkit/components/formautofill/shared/FormAutofillUtils.sys.mjs b/toolkit/components/formautofill/shared/FormAutofillUtils.sys.mjs index c9e570bf4a33..e86f14975c7a 100644 --- a/toolkit/components/formautofill/shared/FormAutofillUtils.sys.mjs +++ b/toolkit/components/formautofill/shared/FormAutofillUtils.sys.mjs @@ -192,7 +192,7 @@ FormAutofillUtils = { getAddressLabel(address) { // TODO: Implement a smarter way for deciding what to display // as option text. Possibly improve the algorithm in - // ProfileAutoCompleteResult.jsm and reuse it here. + // ProfileAutoCompleteResult.sys.mjs and reuse it here. let fieldOrder = [ "name", "-moz-street-address-one-line", // Street address diff --git a/toolkit/components/kvstore/kvstore.sys.mjs b/toolkit/components/kvstore/kvstore.sys.mjs index f320ca6cc5e3..9085eed530c5 100644 --- a/toolkit/components/kvstore/kvstore.sys.mjs +++ b/toolkit/components/kvstore/kvstore.sys.mjs @@ -18,7 +18,8 @@ function promisify(fn, ...args) { * with a database's path and (optionally) its name: * * ``` - * ChromeUtils.import("resource://gre/modules/kvstore.jsm"); + * let { keyValueService } = + * ChromeUtils.importESModule("resource://gre/modules/kvstore.sys.mjs"); * let database = await KeyValueService.getOrCreate(path, name); * ``` * diff --git a/toolkit/components/kvstore/nsIKeyValue.idl b/toolkit/components/kvstore/nsIKeyValue.idl index a9450fd638e6..08cd548af25c 100644 --- a/toolkit/components/kvstore/nsIKeyValue.idl +++ b/toolkit/components/kvstore/nsIKeyValue.idl @@ -22,7 +22,7 @@ interface nsIKeyValuePair; * for all use cases. Extension of this API to support transactions is tracked * by bug 1499238. * - * The kvstore.jsm module wraps this API in a more idiomatic, Promise-based + * The kvstore.sys.mjs module wraps this API in a more idiomatic, Promise-based * JS API that supports async/await. In most cases, you're better off using * that API from JS rather than using this one directly. Bug 1512319 tracks * native support for Promise in Rust-implemented XPCOM methods. @@ -169,7 +169,7 @@ interface nsIKeyValuePair : nsISupports { * an nsIKeyValuePair rather than an nsISupports, so consumers don't need * to QI it to that interface; but this interface doesn't implement the JS * iteration protocol (because the Rust-XPCOM bindings don't yet support it), - * which is another reason why you should use the kvstore.jsm module from JS + * which is another reason why you should use the kvstore.sys.mjs module from JS * instead of accessing this API directly. */ [scriptable, builtinclass, rust_sync, uuid(b9ba7116-b7ff-4717-9a28-a08e6879b199)] diff --git a/toolkit/components/messaging-system/schemas/index.rst b/toolkit/components/messaging-system/schemas/index.rst index f4db543600f1..957dd06c3aa2 100644 --- a/toolkit/components/messaging-system/schemas/index.rst +++ b/toolkit/components/messaging-system/schemas/index.rst @@ -178,8 +178,8 @@ Triggers and actions .. _Experimenter: https://experimenter.info -.. _CFRMessageProvider: https://searchfox.org/mozilla-central/source/browser/components/asrouter/modules/CFRMessageProvider.jsm -.. _PanelTestProvider: https://searchfox.org/mozilla-central/source/browser/components/asrouter/modules/PanelTestProvider.jsm +.. _CFRMessageProvider: https://searchfox.org/mozilla-central/source/browser/components/asrouter/modules/CFRMessageProvider.sys.mjs +.. _PanelTestProvider: https://searchfox.org/mozilla-central/source/browser/components/asrouter/modules/PanelTestProvider.sys.mjs .. _OnboardingMessageProvider: https://searchfox.org/mozilla-central/source/browser/components/asrouter/modules/OnboardingMessageProvider.sys.mjs .. _Test_CFRMessageProvider: https://searchfox.org/mozilla-central/source/browser/components/asrouter/tests//xpcshell/test_CFMessageProvider.js .. _Test_OnboardingMessageProvider: https://searchfox.org/mozilla-central/source/browser/components/asrouter/tests//xpcshell/test_OnboardingMessageProvider.js diff --git a/toolkit/components/nimbus/FeatureManifest.yaml b/toolkit/components/nimbus/FeatureManifest.yaml index 4a43fc319be8..40421e7a7762 100644 --- a/toolkit/components/nimbus/FeatureManifest.yaml +++ b/toolkit/components/nimbus/FeatureManifest.yaml @@ -316,7 +316,7 @@ urlbar: Whether Firefox Suggest will use the new Rust backend instead of the original JS backend. quickSuggestScenario: - # IMPORTANT: This should not have a fallbackPref. See UrlbarPrefs.jsm. + # IMPORTANT: This should not have a fallbackPref. See UrlbarPrefs.sys.mjs. type: string description: The Firefox Suggest scenario in which the user is enrolled enum: diff --git a/toolkit/components/normandy/lib/AddonStudies.sys.mjs b/toolkit/components/normandy/lib/AddonStudies.sys.mjs index 202bf8ccb3bd..e13d470bd7da 100644 --- a/toolkit/components/normandy/lib/AddonStudies.sys.mjs +++ b/toolkit/components/normandy/lib/AddonStudies.sys.mjs @@ -162,7 +162,7 @@ export var AddonStudies = { }, /** - * These migrations should only be called from `NormandyMigrations.jsm` and + * These migrations should only be called from `NormandyMigrations.sys.mjs` and * tests. */ migrations: { diff --git a/toolkit/components/normandy/lib/PreferenceExperiments.sys.mjs b/toolkit/components/normandy/lib/PreferenceExperiments.sys.mjs index d926f5221dda..92c5e63076b9 100644 --- a/toolkit/components/normandy/lib/PreferenceExperiments.sys.mjs +++ b/toolkit/components/normandy/lib/PreferenceExperiments.sys.mjs @@ -906,7 +906,7 @@ export var PreferenceExperiments = { InvalidPreferenceName: class extends Error {}, /** - * These migrations should only be called from `NormandyMigrations.jsm` and tests. + * These migrations should only be called from `NormandyMigrations.sys.mjs` and tests. */ migrations: { /** Move experiments into a specific key. */ diff --git a/toolkit/components/passwordmgr/LoginAutoComplete.sys.mjs b/toolkit/components/passwordmgr/LoginAutoComplete.sys.mjs index 6ff96d999e5f..411d9249dbf1 100644 --- a/toolkit/components/passwordmgr/LoginAutoComplete.sys.mjs +++ b/toolkit/components/passwordmgr/LoginAutoComplete.sys.mjs @@ -503,7 +503,7 @@ export class LoginAutoComplete { let searchStartTimeMS = Services.telemetry.msSystemNow(); // Show the insecure login warning in the passwords field on null principal documents. - // Avoid loading InsecurePasswordUtils.jsm in a sandboxed document (e.g. an ad. frame) if we + // Avoid loading InsecurePasswordUtils.sys.mjs in a sandboxed document (e.g. an ad. frame) if we // already know it has a null principal and will therefore get the insecure autocomplete // treatment. // InsecurePasswordUtils doesn't handle the null principal case as not secure because we don't diff --git a/toolkit/components/passwordmgr/LoginHelper.sys.mjs b/toolkit/components/passwordmgr/LoginHelper.sys.mjs index a63654c8f205..5626312f179b 100644 --- a/toolkit/components/passwordmgr/LoginHelper.sys.mjs +++ b/toolkit/components/passwordmgr/LoginHelper.sys.mjs @@ -1371,7 +1371,7 @@ export const LoginHelper = { * @returns {boolean} True if any of the rules matches */ isInferredLoginForm(formElement) { - // This is copied from 'loginFormAttrRegex' in NewPasswordModel.jsm + // This is copied from 'loginFormAttrRegex' in NewPasswordModel.sys.mjs const loginExpr = /login|log in|log on|log-on|sign in|sigin|sign\/in|sign-in|sign on|sign-on/i; diff --git a/toolkit/components/passwordmgr/LoginManager.shared.mjs b/toolkit/components/passwordmgr/LoginManager.shared.mjs index d50c53cbad74..b0122f71265e 100644 --- a/toolkit/components/passwordmgr/LoginManager.shared.mjs +++ b/toolkit/components/passwordmgr/LoginManager.shared.mjs @@ -34,7 +34,7 @@ class Logic { /** * Test whether associated labels of the element have the keyword. - * This is a simplified rule of hasLabelMatchingRegex in NewPasswordModel.jsm + * This is a simplified rule of hasLabelMatchingRegex in NewPasswordModel.sys.mjs */ static hasLabelMatchingRegex(element, regex) { return regex.test(element.labels?.[0]?.textContent); diff --git a/toolkit/components/passwordmgr/LoginManager.sys.mjs b/toolkit/components/passwordmgr/LoginManager.sys.mjs index b95f3ada8b43..538d7c63e141 100644 --- a/toolkit/components/passwordmgr/LoginManager.sys.mjs +++ b/toolkit/components/passwordmgr/LoginManager.sys.mjs @@ -21,7 +21,7 @@ ChromeUtils.defineLazyGetter(lazy, "log", () => { const MS_PER_DAY = 24 * 60 * 60 * 1000; if (Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT) { - throw new Error("LoginManager.jsm should only run in the parent process"); + throw new Error("LoginManager.sys.mjs should only run in the parent process"); } export function LoginManager() { diff --git a/toolkit/components/passwordmgr/LoginManagerAuthPrompter.sys.mjs b/toolkit/components/passwordmgr/LoginManagerAuthPrompter.sys.mjs index 4dd42885ff7a..f56ec80d5ee2 100644 --- a/toolkit/components/passwordmgr/LoginManagerAuthPrompter.sys.mjs +++ b/toolkit/components/passwordmgr/LoginManagerAuthPrompter.sys.mjs @@ -86,7 +86,7 @@ XPCOMUtils.defineLazyPreferenceGetter( /** * Implements nsIPromptFactory * - * Invoked by [toolkit/components/prompts/src/Prompter.jsm] + * Invoked by [toolkit/components/prompts/src/Prompter.sys.mjs] */ export function LoginManagerAuthPromptFactory() { Services.obs.addObserver(this, "passwordmgr-crypto-login", true); @@ -795,7 +795,7 @@ LoginManagerAuthPrompter.prototype = { .then(ok => (result = ok)) .finally(() => (closed = true)); Services.tm.spinEventLoopUntilOrQuit( - "LoginManagerAuthPrompter.jsm:promptAuth", + "LoginManagerAuthPrompter.sys.mjs:promptAuth", () => closed ); return result; diff --git a/toolkit/components/pictureinpicture/content/player.js b/toolkit/components/pictureinpicture/content/player.js index fdd13f8955dc..d306494d923c 100644 --- a/toolkit/components/pictureinpicture/content/player.js +++ b/toolkit/components/pictureinpicture/content/player.js @@ -45,7 +45,7 @@ const BOTTOM_LEFT_QUADRANT = 3; const BOTTOM_RIGHT_QUADRANT = 4; /** - * Public function to be called from PictureInPicture.jsm. This is the main + * Public function to be called from PictureInPicture.sys.mjs. This is the main * entrypoint for initializing the player window. * * @param {Number} id @@ -61,7 +61,7 @@ function setupPlayer(id, wgp, videoRef) { } /** - * Public function to be called from PictureInPicture.jsm. This update the + * Public function to be called from PictureInPicture.sys.mjs. This update the * controls based on whether or not the video is playing. * * @param {Boolean} isPlaying @@ -72,7 +72,7 @@ function setIsPlayingState(isPlaying) { } /** - * Public function to be called from PictureInPicture.jsm. This update the + * Public function to be called from PictureInPicture.sys.mjs. This update the * controls based on whether or not the video is muted. * * @param {Boolean} isMuted diff --git a/toolkit/components/places/Bookmarks.sys.mjs b/toolkit/components/places/Bookmarks.sys.mjs index 97416db6d519..02d9c270fada 100644 --- a/toolkit/components/places/Bookmarks.sys.mjs +++ b/toolkit/components/places/Bookmarks.sys.mjs @@ -230,7 +230,7 @@ export var Bookmarks = Object.freeze({ if (addedTime > now) { modTime = now; } - let insertInfo = validateBookmarkObject("Bookmarks.jsm: insert", info, { + let insertInfo = validateBookmarkObject("Bookmarks.sys.mjs: insert", info, { type: { defaultValue: this.TYPE_BOOKMARK }, index: { defaultValue: this.DEFAULT_INDEX }, url: { @@ -488,7 +488,7 @@ export var Bookmarks = Object.freeze({ } try { insertInfo = validateBookmarkObject( - "Bookmarks.jsm: insertTree", + "Bookmarks.sys.mjs: insertTree", info, insertInfo ); @@ -681,7 +681,7 @@ export var Bookmarks = Object.freeze({ // The info object is first validated here to ensure it's consistent, then // it's compared to the existing item to remove any properties that don't // need to be updated. - let updateInfo = validateBookmarkObject("Bookmarks.jsm: update", info, { + let updateInfo = validateBookmarkObject("Bookmarks.sys.mjs: update", info, { guid: { required: true }, index: { requiredIf: b => b.hasOwnProperty("parentGuid"), @@ -722,23 +722,27 @@ export var Bookmarks = Object.freeze({ Math.max(item.lastModified, updateInfo.dateAdded) ); } - updateInfo = validateBookmarkObject("Bookmarks.jsm: update", updateInfo, { - url: { validIf: () => item.type == this.TYPE_BOOKMARK }, - title: { - validIf: () => - [this.TYPE_BOOKMARK, this.TYPE_FOLDER].includes(item.type), - }, - lastModified: { - defaultValue: lastModifiedDefault, - validIf: b => - b.lastModified >= now || - b.lastModified >= (b.dateAdded || item.dateAdded), - }, - dateAdded: { defaultValue: item.dateAdded }, - }); + updateInfo = validateBookmarkObject( + "Bookmarks.sys.mjs: update", + updateInfo, + { + url: { validIf: () => item.type == this.TYPE_BOOKMARK }, + title: { + validIf: () => + [this.TYPE_BOOKMARK, this.TYPE_FOLDER].includes(item.type), + }, + lastModified: { + defaultValue: lastModifiedDefault, + validIf: b => + b.lastModified >= now || + b.lastModified >= (b.dateAdded || item.dateAdded), + }, + dateAdded: { defaultValue: item.dateAdded }, + } + ); return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: update", + "Bookmarks.sys.mjs: update", async db => { let parent; if (updateInfo.hasOwnProperty("parentGuid")) { @@ -1031,7 +1035,7 @@ export var Bookmarks = Object.freeze({ lazy.PlacesSyncUtils.bookmarks.determineSyncChangeDelta(source); await lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: moveToFolder", + "Bookmarks.sys.mjs: moveToFolder", async db => { const lastModified = new Date(); @@ -1283,7 +1287,10 @@ export var Bookmarks = Object.freeze({ // Even if we ignore any other unneeded property, we still validate any // known property to reduce likelihood of hidden bugs. - let removeInfo = validateBookmarkObject("Bookmarks.jsm: remove", info); + let removeInfo = validateBookmarkObject( + "Bookmarks.sys.mjs: remove", + info + ); removeInfos.push(removeInfo); } @@ -1372,7 +1379,7 @@ export var Bookmarks = Object.freeze({ } return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: eraseEverything", + "Bookmarks.sys.mjs: eraseEverything", async function (db) { let urls; await db.executeTransaction(async function () { @@ -1552,7 +1559,7 @@ export var Bookmarks = Object.freeze({ // Even if we ignore any other unneeded property, we still validate any // known property to reduce likelihood of hidden bugs. let fetchInfo = validateBookmarkObject( - "Bookmarks.jsm: fetch", + "Bookmarks.sys.mjs: fetch", info, behavior ); @@ -1695,7 +1702,7 @@ export var Bookmarks = Object.freeze({ * } */ async fetchTags() { - // TODO: Once the tagging API is implemented in Bookmarks.jsm, we can cache + // TODO: Once the tagging API is implemented in Bookmarks.sys.mjs, we can cache // the list of tags, instead of querying every time. let db = await lazy.PlacesUtils.promiseDBConnection(); let rows = await db.executeCached( @@ -1742,7 +1749,7 @@ export var Bookmarks = Object.freeze({ */ reorder(parentGuid, orderedChildrenGuids, options = {}) { let info = { guid: parentGuid }; - info = validateBookmarkObject("Bookmarks.jsm: reorder", info, { + info = validateBookmarkObject("Bookmarks.sys.mjs: reorder", info, { guid: { required: true }, }); @@ -2104,7 +2111,7 @@ async function updateBookmark( function insertBookmark(item, parent) { return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: insertBookmark", + "Bookmarks.sys.mjs: insertBookmark", async function (db) { // If a guid was not provided, generate one, so we won't need to fetch the // bookmark just after having created it. @@ -2202,7 +2209,7 @@ function insertBookmark(item, parent) { function insertBookmarkTree(items, source, parent, urls, lastAddedForParent) { return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: insertBookmarkTree", + "Bookmarks.sys.mjs: insertBookmarkTree", async function (db) { await db.executeTransaction(async function transaction() { await lazy.PlacesUtils.maybeInsertManyPlaces(db, urls); @@ -2353,7 +2360,7 @@ async function queryBookmarks(info) { } return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: queryBookmarks", + "Bookmarks.sys.mjs: queryBookmarks", async function (db) { // _id, _childCount, _grandParentId and _parentId fields // are required to be in the result by the converting function @@ -2422,7 +2429,7 @@ async function fetchBookmark(info, options = {}) { return query(options.db); } return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: fetchBookmark", + "Bookmarks.sys.mjs: fetchBookmark", query ); } @@ -2454,7 +2461,7 @@ async function fetchBookmarkByPosition(info, options = {}) { return query(db); } return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: fetchBookmarkByPosition", + "Bookmarks.sys.mjs: fetchBookmarkByPosition", query ); } @@ -2502,7 +2509,7 @@ async function fetchBookmarksByTags(info, options = {}) { return query(db); } return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: fetchBookmarksByTags", + "Bookmarks.sys.mjs: fetchBookmarksByTags", query ); } @@ -2532,7 +2539,7 @@ async function fetchBookmarksByGUIDPrefix(info, options = {}) { return query(db); } return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: fetchBookmarksByGUIDPrefix", + "Bookmarks.sys.mjs: fetchBookmarksByGUIDPrefix", query ); } @@ -2574,7 +2581,7 @@ async function fetchBookmarksByURL(info, options = {}) { return query(db); } return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: fetchBookmarksByURL", + "Bookmarks.sys.mjs: fetchBookmarksByURL", query ); } @@ -2607,14 +2614,14 @@ async function fetchBookmarksByParentGUID(info, options = {}) { return query(db); } return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: fetchBookmarksByParentGUID", + "Bookmarks.sys.mjs: fetchBookmarksByParentGUID", query ); } function fetchRecentBookmarks(numberOfItems) { return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: fetchRecentBookmarks", + "Bookmarks.sys.mjs: fetchRecentBookmarks", async function (db) { let rows = await db.executeCached( `SELECT b.guid, IFNULL(p.guid, '') AS parentGuid, b.position AS 'index', @@ -2667,7 +2674,7 @@ async function fetchBookmarksByParent(db, info) { function removeBookmarks(items, options) { return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: removeBookmarks", + "Bookmarks.sys.mjs: removeBookmarks", async function (db) { let urls = []; @@ -2780,7 +2787,7 @@ function removeBookmarks(items, options) { function reorderChildren(parent, orderedChildrenGuids, options) { return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: reorderChildren", + "Bookmarks.sys.mjs: reorderChildren", db => db.executeTransaction(async function () { // Fetch old indices for the notifications. @@ -3314,7 +3321,7 @@ async function retrieveFullBookmarkPath(guid, options = {}) { return query(db); } return lazy.PlacesUtils.withConnectionWrapper( - "Bookmarks.jsm: retrieveFullBookmarkPath", + "Bookmarks.sys.mjs: retrieveFullBookmarkPath", query ); } diff --git a/toolkit/components/places/History.sys.mjs b/toolkit/components/places/History.sys.mjs index 3f43ca5a5335..fe13043600ea 100644 --- a/toolkit/components/places/History.sys.mjs +++ b/toolkit/components/places/History.sys.mjs @@ -251,8 +251,9 @@ export var History = Object.freeze({ insert(pageInfo) { let info = lazy.PlacesUtils.validatePageInfo(pageInfo); - return lazy.PlacesUtils.withConnectionWrapper("History.jsm: insert", db => - insert(db, info) + return lazy.PlacesUtils.withConnectionWrapper( + "History.sys.mjs: insert", + db => insert(db, info) ); }, @@ -322,7 +323,7 @@ export var History = Object.freeze({ } return lazy.PlacesUtils.withConnectionWrapper( - "History.jsm: insertMany", + "History.sys.mjs: insertMany", db => insertMany(db, infos, onResult, onError) ); }, @@ -400,7 +401,7 @@ export var History = Object.freeze({ let pages = { guids: guidsSlice, urls: urlsSlice }; let result = await lazy.PlacesUtils.withConnectionWrapper( - "History.jsm: remove", + "History.sys.mjs: remove", db => remove(db, pages, onResult) ); @@ -499,7 +500,7 @@ export var History = Object.freeze({ } return lazy.PlacesUtils.withConnectionWrapper( - "History.jsm: removeVisitsByFilter", + "History.sys.mjs: removeVisitsByFilter", db => removeVisitsByFilter(db, filter, onResult) ); }, @@ -592,7 +593,7 @@ export var History = Object.freeze({ } return lazy.PlacesUtils.withConnectionWrapper( - "History.jsm: removeByFilter", + "History.sys.mjs: removeByFilter", db => removeByFilter(db, filter, onResult) ); }, @@ -644,7 +645,10 @@ export var History = Object.freeze({ * A promise resolved once the operation is complete. */ clear() { - return lazy.PlacesUtils.withConnectionWrapper("History.jsm: clear", clear); + return lazy.PlacesUtils.withConnectionWrapper( + "History.sys.mjs: clear", + clear + ); }, /** @@ -705,7 +709,7 @@ export var History = Object.freeze({ * 1). A null `previewImageURL` will clear the existing value in the * database. * 2). It throws if its length is greater than DB_URL_LENGTH_MAX - * defined in PlacesUtils.jsm. + * defined in PlacesUtils.sys.mjs. * * If a property `annotations` is provided, the annotations will be * updated. Note that: @@ -728,7 +732,7 @@ export var History = Object.freeze({ * If `pageInfo` has neither `description` nor `previewImageURL`. * @throws (Error) * If the length of `pageInfo.previewImageURL` is greater than - * DB_URL_LENGTH_MAX defined in PlacesUtils.jsm. + * DB_URL_LENGTH_MAX defined in PlacesUtils.sys.mjs. */ update(pageInfo) { let info = lazy.PlacesUtils.validatePageInfo(pageInfo, false); @@ -744,8 +748,9 @@ export var History = Object.freeze({ ); } - return lazy.PlacesUtils.withConnectionWrapper("History.jsm: update", db => - update(db, info) + return lazy.PlacesUtils.withConnectionWrapper( + "History.sys.mjs: update", + db => update(db, info) ); }, diff --git a/toolkit/components/places/PlacesExpiration.sys.mjs b/toolkit/components/places/PlacesExpiration.sys.mjs index 4db494d63e6f..2621decdc587 100644 --- a/toolkit/components/places/PlacesExpiration.sys.mjs +++ b/toolkit/components/places/PlacesExpiration.sys.mjs @@ -435,7 +435,7 @@ export function nsPlacesExpiration() { ); this._dbInitializedPromise = lazy.PlacesUtils.withConnectionWrapper( - "PlacesExpiration.jsm: setup", + "PlacesExpiration.sys.mjs: setup", async db => { await db.execute( `CREATE TEMP TABLE expiration_notify ( @@ -758,7 +758,7 @@ nsPlacesExpiration.prototype = { try { let notifications = []; await lazy.PlacesUtils.withConnectionWrapper( - "PlacesExpiration.jsm: expire", + "PlacesExpiration.sys.mjs: expire", async db => { await db.executeTransaction(async () => { for (let queryType in EXPIRATION_QUERIES) { diff --git a/toolkit/components/places/PlacesPreviews.sys.mjs b/toolkit/components/places/PlacesPreviews.sys.mjs index 73d0d6d95265..e19bf2a55c3f 100644 --- a/toolkit/components/places/PlacesPreviews.sys.mjs +++ b/toolkit/components/places/PlacesPreviews.sys.mjs @@ -85,7 +85,7 @@ class DeletionHandler { constructor() { // Clear any pending timeouts on shutdown. lazy.PlacesUtils.history.shutdownClient.jsclient.addBlocker( - "PlacesPreviews.jsm::DeletionHandler", + "PlacesPreviews.sys.mjs::DeletionHandler", async () => { this.#shutdownProgress.shuttingDown = true; lazy.clearTimeout(this.#timeoutId); @@ -164,7 +164,7 @@ class DeletionHandler { return p; }, {}); await lazy.PlacesUtils.withConnectionWrapper( - "PlacesPreviews.jsm::ExpirePreviews", + "PlacesPreviews.sys.mjs::ExpirePreviews", async db => { await db.execute( `DELETE FROM moz_previews_tombstones WHERE hash in @@ -288,7 +288,7 @@ export const PlacesPreviews = new (class extends EventEmitter { * Updates the preview for the given page url. The update happens in * background, using a windowless browser with very conservative privacy * settings. Due to this, it may not look exactly like the page that the user - * is normally facing when logged in. See BackgroundPageThumbs.jsm for + * is normally facing when logged in. See BackgroundPageThumbs.sys.mjs for * additional details. * Unless `forceUpdate` is set, the preview is not updated if: * - It was already fetched recently @@ -385,7 +385,7 @@ export const PlacesPreviews = new (class extends EventEmitter { .map(n => n.substring(0, n.lastIndexOf("."))); await lazy.PlacesUtils.withConnectionWrapper( - "PlacesPreviews.jsm::deleteOrphans", + "PlacesPreviews.sys.mjs::deleteOrphans", async db => { await db.execute( ` diff --git a/toolkit/components/places/PlacesSyncUtils.sys.mjs b/toolkit/components/places/PlacesSyncUtils.sys.mjs index 6da1b9124364..caa5054885af 100644 --- a/toolkit/components/places/PlacesSyncUtils.sys.mjs +++ b/toolkit/components/places/PlacesSyncUtils.sys.mjs @@ -11,7 +11,7 @@ ChromeUtils.defineESModuleGetters(lazy, { /** * This module exports functions for Sync to use when applying remote - * records. The calls are similar to those in `Bookmarks.jsm` and + * records. The calls are similar to those in `Bookmarks.sys.mjs` and * `nsINavBookmarksService`, with special handling for * tags, keywords, synced annotations, and missing parents. */ @@ -1405,7 +1405,7 @@ function validateChangeRecord(name, changeRecord, behavior) { } // Similar to the private `fetchBookmarksByParent` implementation in -// `Bookmarks.jsm`. +// `Bookmarks.sys.mjs`. var fetchChildGuids = async function (db, parentGuid) { let rows = await db.executeCached( ` diff --git a/toolkit/components/places/Shutdown.h b/toolkit/components/places/Shutdown.h index 3e5612a4541f..0a9674bf0647 100644 --- a/toolkit/components/places/Shutdown.h +++ b/toolkit/components/places/Shutdown.h @@ -28,8 +28,8 @@ class Database; * PHASE 2 (Modern clients shutdown) * Modern clients should instead register as a blocker by passing a promise to - * nsINavHistoryService::shutdownClient (for example see Sanitizer.jsm), so they - * block Places shutdown until the promise is resolved. + * nsINavHistoryService::shutdownClient (for example see Sanitizer.sys.mjs), so + * they block Places shutdown until the promise is resolved. * When profile-change-teardown is observed by async shutdown, it calls * ClientsShutdownBlocker::BlockShutdown. This class is registered as a teardown * phase blocker in Database::Init (see Database::mClientsShutdown). diff --git a/toolkit/components/places/mozIAsyncHistory.idl b/toolkit/components/places/mozIAsyncHistory.idl index 90c32b1090b0..88690b4798e3 100644 --- a/toolkit/components/places/mozIAsyncHistory.idl +++ b/toolkit/components/places/mozIAsyncHistory.idl @@ -128,11 +128,11 @@ interface mozIVisitedStatusCallback : nsISupports /** * This interface contains APIs for cpp consumers. - * Javascript consumers should look at History.jsm instead, + * Javascript consumers should look at History.sys.mjs instead, * that is exposed through PlacesUtils.history. * * If you're evaluating adding a new history API, it should - * usually go to History.jsm, unless it needs to do long and + * usually go to History.sys.mjs, unless it needs to do long and * expensive work in a batch, then it could be worth doing * that in History.cpp. */ diff --git a/toolkit/components/prompts/docs/nsIPromptService-reference.rst b/toolkit/components/prompts/docs/nsIPromptService-reference.rst index 9879cd753a48..c1412a30f845 100644 --- a/toolkit/components/prompts/docs/nsIPromptService-reference.rst +++ b/toolkit/components/prompts/docs/nsIPromptService-reference.rst @@ -2,7 +2,7 @@ Prompt Service Reference ======================== -This is the JSDoc from the Prompter.jsm implementation. You can find the full +This is the JSDoc from the Prompter.sys.mjs implementation. You can find the full interface definition in `nsIPromptService.idl `_. diff --git a/toolkit/components/prompts/src/Prompter.sys.mjs b/toolkit/components/prompts/src/Prompter.sys.mjs index 4c8030c27b37..a0b5edca2f4a 100644 --- a/toolkit/components/prompts/src/Prompter.sys.mjs +++ b/toolkit/components/prompts/src/Prompter.sys.mjs @@ -1058,7 +1058,7 @@ class ModalPrompter { closed = true; }); Services.tm.spinEventLoopUntilOrQuit( - "prompts/Prompter.jsm:openPromptSync", + "prompts/Prompter.sys.mjs:openPromptSync", () => closed ); } diff --git a/toolkit/components/resistfingerprinting/RFPHelper.sys.mjs b/toolkit/components/resistfingerprinting/RFPHelper.sys.mjs index a085aa492a4e..223c0259b76d 100644 --- a/toolkit/components/resistfingerprinting/RFPHelper.sys.mjs +++ b/toolkit/components/resistfingerprinting/RFPHelper.sys.mjs @@ -20,7 +20,7 @@ var logConsole; function log(msg) { if (!logConsole) { logConsole = console.createInstance({ - prefix: "RFPHelper.jsm", + prefix: "RFPHelper", maxLogLevelPref: "privacy.resistFingerprinting.jsmloglevel", }); } diff --git a/toolkit/components/satchel/FormHistoryStartup.sys.mjs b/toolkit/components/satchel/FormHistoryStartup.sys.mjs index 104756c5832e..aa76f16dc552 100644 --- a/toolkit/components/satchel/FormHistoryStartup.sys.mjs +++ b/toolkit/components/satchel/FormHistoryStartup.sys.mjs @@ -67,7 +67,7 @@ export class FormHistoryStartup { target, }) { // This case is only used for the search field. There is a - // similar algorithm in FormHistoryParent.jsm that uses + // similar algorithm in FormHistoryParent.sys.mjs that uses // sendQuery for other form fields. const instance = (this._queryInstance = {}); diff --git a/toolkit/components/satchel/nsFormFillController.cpp b/toolkit/components/satchel/nsFormFillController.cpp index 7872ab36c86e..1bcbde08dfec 100644 --- a/toolkit/components/satchel/nsFormFillController.cpp +++ b/toolkit/components/satchel/nsFormFillController.cpp @@ -85,7 +85,7 @@ nsFormFillController::nsFormFillController() mListNode(nullptr), // The amount of time a context menu event supresses showing a // popup from a focus event in ms. This matches the threshold in - // toolkit/components/passwordmgr/LoginManagerChild.jsm. + // toolkit/components/passwordmgr/LoginManagerChild.sys.mjs. mFocusAfterRightClickThreshold(400), mTimeout(50), mMinResultsForPopup(1), diff --git a/toolkit/components/taskscheduler/TaskScheduler.sys.mjs b/toolkit/components/taskscheduler/TaskScheduler.sys.mjs index 2225328c4172..4de5d0a76c8e 100644 --- a/toolkit/components/taskscheduler/TaskScheduler.sys.mjs +++ b/toolkit/components/taskscheduler/TaskScheduler.sys.mjs @@ -93,7 +93,7 @@ export var TaskScheduler = { * * options.disabled * If true the task will be created disabled, so that it will not be run. - * Ignored on macOS: see comments in TaskSchedulerMacOSImpl.jsm. + * Ignored on macOS: see comments in TaskSchedulerMacOSImpl.sys.mjs. * Default false, intended for tests. * * options.executionTimeoutSec diff --git a/toolkit/components/taskscheduler/TaskSchedulerMacOSImpl.sys.mjs b/toolkit/components/taskscheduler/TaskSchedulerMacOSImpl.sys.mjs index d47d3c5c14ed..3cd5b5c51d94 100644 --- a/toolkit/components/taskscheduler/TaskSchedulerMacOSImpl.sys.mjs +++ b/toolkit/components/taskscheduler/TaskSchedulerMacOSImpl.sys.mjs @@ -36,7 +36,7 @@ ChromeUtils.defineLazyGetter(lazy, "log", () => { /** * Task generation and management for macOS, using `launchd` via `launchctl`. * - * Implements the API exposed in TaskScheduler.jsm + * Implements the API exposed in TaskScheduler.sys.mjs * Not intended for external use, this is in a separate module to ship the code only * on macOS, and to expose for testing. */ diff --git a/toolkit/components/taskscheduler/TaskSchedulerWinImpl.sys.mjs b/toolkit/components/taskscheduler/TaskSchedulerWinImpl.sys.mjs index 8d9c15c31494..009fc18c387e 100644 --- a/toolkit/components/taskscheduler/TaskSchedulerWinImpl.sys.mjs +++ b/toolkit/components/taskscheduler/TaskSchedulerWinImpl.sys.mjs @@ -22,7 +22,7 @@ XPCOMUtils.defineLazyServiceGetters(lazy, { /** * Task generation and management for Windows, using Task Scheduler 2.0 (taskschd). * - * Implements the API exposed in TaskScheduler.jsm + * Implements the API exposed in TaskScheduler.sys.mjs * Not intended for external use, this is in a separate module to ship the code only * on Windows, and to expose for testing. */ diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index 68db4fa42a7e..223b96f082e7 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -7011,7 +7011,7 @@ "n_values": 50, "releaseChannelCollection": "opt-out", "bug_numbers": [353804], - "description": "Update: background update check result code except for no updates found (after we already have an update ready). Possible codes are enumerated by constants starting with CHK_ in toolkit/mozapps/update/UpdateTelemetry.jsm" + "description": "Update: background update check result code except for no updates found (after we already have an update ready). Possible codes are enumerated by constants starting with CHK_ in toolkit/mozapps/update/UpdateTelemetry.sys.mjs" }, "UPDATE_CHECK_EXTENDED_ERROR_EXTERNAL": { "record_in_processes": ["main"], @@ -7757,7 +7757,7 @@ "n_values": 30, "releaseChannelCollection": "opt-out", "bug_numbers": [1137447], - "description": "Update: the update wizard page displayed when the UI was closed (mapped in toolkit/mozapps/update/UpdateTelemetry.jsm)" + "description": "Update: the update wizard page displayed when the UI was closed (mapped in toolkit/mozapps/update/UpdateTelemetry.sys.mjs)" }, "UPDATE_NOTIFICATION_SHOWN": { "record_in_processes": ["main"], @@ -8322,7 +8322,7 @@ "kind": "enumerated", "n_values": 15, "releaseChannelCollection": "opt-out", - "description": "The browser that data is pulled from. The values correspond to the internal browser ID (see MigrationUtils.jsm)" + "description": "The browser that data is pulled from. The values correspond to the internal browser ID (see MigrationUtils.sys.mjs)" }, "FX_MIGRATION_ERRORS": { "record_in_processes": ["main"], @@ -8402,7 +8402,7 @@ "high": 60000, "releaseChannelCollection": "opt-out", "keyed": true, - "description": "Accumulated timer delay (variance between when the timer was expected to fire and when it actually fired) in milliseconds as an indicator for decreased main-thread responsiveness while importing bookmarks from another browser, keyed by the name of the browser (see gAvailableMigratorKeys in MigrationUtils.jsm). The import is happening on a background thread and should ideally not affect the UI noticeably." + "description": "Accumulated timer delay (variance between when the timer was expected to fire and when it actually fired) in milliseconds as an indicator for decreased main-thread responsiveness while importing bookmarks from another browser, keyed by the name of the browser (see gAvailableMigratorKeys in MigrationUtils.sys.mjs). The import is happening on a background thread and should ideally not affect the UI noticeably." }, "FX_MIGRATION_HISTORY_JANK_MS": { "record_in_processes": ["main"], @@ -8415,7 +8415,7 @@ "high": 60000, "releaseChannelCollection": "opt-out", "keyed": true, - "description": "Accumulated timer delay (variance between when the timer was expected to fire and when it actually fired) in milliseconds as an indicator for decreased main-thread responsiveness while importing history from another browser, keyed by the name of the browser (see gAvailableMigratorKeys in MigrationUtils.jsm). The import is happening on a background thread and should ideally not affect the UI noticeably." + "description": "Accumulated timer delay (variance between when the timer was expected to fire and when it actually fired) in milliseconds as an indicator for decreased main-thread responsiveness while importing history from another browser, keyed by the name of the browser (see gAvailableMigratorKeys in MigrationUtils.sys.mjs). The import is happening on a background thread and should ideally not affect the UI noticeably." }, "FX_MIGRATION_LOGINS_JANK_MS": { "record_in_processes": ["main"], @@ -8428,7 +8428,7 @@ "high": 60000, "releaseChannelCollection": "opt-out", "keyed": true, - "description": "Accumulated timer delay (variance between when the timer was expected to fire and when it actually fired) in milliseconds as an indicator for decreased main-thread responsiveness while importing logins / passwords from another browser, keyed by the name of the browser (see gAvailableMigratorKeys in MigrationUtils.jsm). The import is happening on a background thread and should ideally not affect the UI noticeably. The time with the blocking Keychain dialog on macOS can skew this data." + "description": "Accumulated timer delay (variance between when the timer was expected to fire and when it actually fired) in milliseconds as an indicator for decreased main-thread responsiveness while importing logins / passwords from another browser, keyed by the name of the browser (see gAvailableMigratorKeys in MigrationUtils.sys.mjs). The import is happening on a background thread and should ideally not affect the UI noticeably. The time with the blocking Keychain dialog on macOS can skew this data." }, "FX_MIGRATION_BOOKMARKS_QUANTITY": { "record_in_processes": ["main"], @@ -12479,7 +12479,7 @@ "expires_in_version": "default", "kind": "enumerated", "n_values": 10, - "description": "BACKGROUND THUMBNAILS: Reason the capture completed (see TEL_CAPTURE_DONE_* constants in BackgroundPageThumbs.jsm)" + "description": "BACKGROUND THUMBNAILS: Reason the capture completed (see TEL_CAPTURE_DONE_* constants in BackgroundPageThumbs.sys.mjs)" }, "FX_THUMBNAILS_BG_CAPTURE_PAGE_LOAD_TIME_MS": { "record_in_processes": ["main", "content"], diff --git a/toolkit/components/telemetry/Scalars.yaml b/toolkit/components/telemetry/Scalars.yaml index 1028e83d5e2d..858d2556e485 100644 --- a/toolkit/components/telemetry/Scalars.yaml +++ b/toolkit/components/telemetry/Scalars.yaml @@ -5016,7 +5016,7 @@ update: to be moved from the downloading update directory to the ready update directory. This probe counts the results that we get when attempting to perform this file move. Valid values for the keys for this probe are - stored in the MOVE_RESULT_* values in UpdateTelemetry.jsm. + stored in the MOVE_RESULT_* values in UpdateTelemetry.sys.mjs. expires: never kind: uint keyed: true diff --git a/toolkit/components/telemetry/TelemetryStartup.sys.mjs b/toolkit/components/telemetry/TelemetryStartup.sys.mjs index 139366bd5ecc..dae0c268db90 100644 --- a/toolkit/components/telemetry/TelemetryStartup.sys.mjs +++ b/toolkit/components/telemetry/TelemetryStartup.sys.mjs @@ -12,7 +12,7 @@ ChromeUtils.defineESModuleGetters(lazy, { /** * TelemetryStartup is needed to forward the "profile-after-change" notification - * to TelemetryController.jsm. + * to TelemetryController.sys.mjs. */ export function TelemetryStartup() {} diff --git a/toolkit/components/telemetry/docs/data/health-ping.rst b/toolkit/components/telemetry/docs/data/health-ping.rst index e5655924e11f..8b1be7810532 100644 --- a/toolkit/components/telemetry/docs/data/health-ping.rst +++ b/toolkit/components/telemetry/docs/data/health-ping.rst @@ -38,7 +38,7 @@ The client id is submitted with this ping. Send behavior ------------- -``HealthPing.jsm`` tracks several problems: +``HealthPing.sys.mjs`` tracks several problems: * The size of other assembled pings exceeds the ping limit. * Failures while sending other pings. diff --git a/toolkit/components/telemetry/docs/obsolete/fhr/architecture.rst b/toolkit/components/telemetry/docs/obsolete/fhr/architecture.rst index 2e9c37f3d344..bfdce6daab46 100644 --- a/toolkit/components/telemetry/docs/obsolete/fhr/architecture.rst +++ b/toolkit/components/telemetry/docs/obsolete/fhr/architecture.rst @@ -4,11 +4,11 @@ Architecture ============ -``healthreporter.jsm`` contains the main interface for FHR, the +``healthreporter.sys.mjs`` contains the main interface for FHR, the ``HealthReporter`` type. An instance of this is created by the ``data_reporting_service``. -``providers.jsm`` contains numerous ``Metrics.Provider`` and +``providers.sys.mjs`` contains numerous ``Metrics.Provider`` and ``Metrics.Measurement`` used for collecting application metrics. If you are looking for the FHR probes, this is where they are. @@ -157,7 +157,7 @@ See ``HealthReportComponents.manifest`` for providers defined in this directory. Essentially, the category manager receives the name of a JS type and the -URI of a JSM to import that exports this symbol. At run-time, the +URI of a sys.mjs to import that exports this symbol. At run-time, the providers registered in the category manager are instantiated. Providers are registered via the category manager to make registration diff --git a/toolkit/components/telemetry/docs/obsolete/fhr/dataformat.rst b/toolkit/components/telemetry/docs/obsolete/fhr/dataformat.rst index 730d7514b8c8..8a9d9a591b47 100644 --- a/toolkit/components/telemetry/docs/obsolete/fhr/dataformat.rst +++ b/toolkit/components/telemetry/docs/obsolete/fhr/dataformat.rst @@ -1700,7 +1700,7 @@ Version 1 was introduced with Firefox 37 and includes the following properties: state Corresponds to either a STATE_USER_* string or a STATE_INTERNAL_* string in - FxaMigration.jsm. This reflects a state where we are waiting for the user, + FxaMigration.sys.mjs. This reflects a state where we are waiting for the user, or waiting for some internal process to complete on the way to completing the migration. diff --git a/toolkit/components/translations/translations.d.ts b/toolkit/components/translations/translations.d.ts index ec1e899af42a..cc8d462a9cd0 100644 --- a/toolkit/components/translations/translations.d.ts +++ b/toolkit/components/translations/translations.d.ts @@ -187,7 +187,7 @@ export namespace Bergamot { /** * The client to interact with RemoteSettings. - * See services/settings/RemoteSettingsClient.jsm + * See services/settings/RemoteSettingsClient.sys.mjs */ interface RemoteSettingsClient { on: Function, diff --git a/toolkit/components/url-classifier/UrlClassifierListManager.sys.mjs b/toolkit/components/url-classifier/UrlClassifierListManager.sys.mjs index 410e203672f5..a96c6bad15ff 100644 --- a/toolkit/components/url-classifier/UrlClassifierListManager.sys.mjs +++ b/toolkit/components/url-classifier/UrlClassifierListManager.sys.mjs @@ -70,7 +70,7 @@ function PROT_ListManager() { this.updateCheckers_ = {}; this.requestBackoffs_ = {}; - // This is only used by testcases to ensure SafeBrowsing.jsm is inited + // This is only used by testcases to ensure SafeBrowsing.sys.mjs is inited this.registered = false; this.dbService_ = Cc["@mozilla.org/url-classifier/dbservice;1"].getService( diff --git a/toolkit/components/url-classifier/UrlClassifierRemoteSettingsService.sys.mjs b/toolkit/components/url-classifier/UrlClassifierRemoteSettingsService.sys.mjs index 42f8cf272a09..55f6efd5f048 100644 --- a/toolkit/components/url-classifier/UrlClassifierRemoteSettingsService.sys.mjs +++ b/toolkit/components/url-classifier/UrlClassifierRemoteSettingsService.sys.mjs @@ -55,7 +55,7 @@ UrlClassifierRemoteSettingsService.prototype = { }); }, - // Parse the update request. See UrlClassifierListManager.jsm makeUpdateRequest + // Parse the update request. See UrlClassifierListManager.sys.mjs makeUpdateRequest // for more details about how we build the update request. // // @param aRequest the request payload of the update request diff --git a/toolkit/components/url-classifier/nsIUrlListManager.idl b/toolkit/components/url-classifier/nsIUrlListManager.idl index 6bf01020ee0d..fb2408ca3dbd 100644 --- a/toolkit/components/url-classifier/nsIUrlListManager.idl +++ b/toolkit/components/url-classifier/nsIUrlListManager.idl @@ -88,7 +88,7 @@ interface nsIUrlListManager : nsISupports /** * Return true if someone registers a table, this is used by testcase - * to figure out it SafeBrowsing.jsm is initialized. + * to figure out it SafeBrowsing.sys.mjs is initialized. */ boolean isRegistered(); }; diff --git a/toolkit/components/utils/ClientEnvironment.sys.mjs b/toolkit/components/utils/ClientEnvironment.sys.mjs index 7f1b4cb97027..1c6bbfbabaf2 100644 --- a/toolkit/components/utils/ClientEnvironment.sys.mjs +++ b/toolkit/components/utils/ClientEnvironment.sys.mjs @@ -216,7 +216,7 @@ export class ClientEnvironmentBase { /** * Gets the windows build number by querying the OS directly. The initial - * version was copied from toolkit/components/telemetry/app/TelemetryEnvironment.jsm + * version was copied from toolkit/components/telemetry/app/TelemetryEnvironment.sys.mjs * @returns {number | null} The build number, or null on non-Windows platform or if there is an error. */ get windowsBuildNumber() { diff --git a/toolkit/content/aboutLogging.js b/toolkit/content/aboutLogging.js index 4d797e6201a6..daff10fbec6b 100644 --- a/toolkit/content/aboutLogging.js +++ b/toolkit/content/aboutLogging.js @@ -50,7 +50,7 @@ function moduleEnvVarPresent() { * as markers. * * [1]: The keys of the `presets` object defined in - * https://searchfox.org/mozilla-central/source/devtools/client/performance-new/shared/background.jsm.js + * https://searchfox.org/mozilla-central/source/devtools/client/performance-new/shared/background.sys.mjs */ const gOsSpecificLoggingPresets = (() => { diff --git a/toolkit/content/widgets/datetimebox.js b/toolkit/content/widgets/datetimebox.js index 28b32fddfa35..04ed398bd74b 100644 --- a/toolkit/content/widgets/datetimebox.js +++ b/toolkit/content/widgets/datetimebox.js @@ -5,7 +5,7 @@ "use strict"; // This is a UA widget. It runs in per-origin UA widget scope, -// to be loaded by UAWidgetsChild.jsm. +// to be loaded by UAWidgetsChild.sys.mjs. /* * This is the class of entry. It will construct the actual implementation diff --git a/toolkit/content/widgets/menu.js b/toolkit/content/widgets/menu.js index f787747a0174..1a55d799b60f 100644 --- a/toolkit/content/widgets/menu.js +++ b/toolkit/content/widgets/menu.js @@ -129,7 +129,7 @@ }; // The element is used for rendering inside of , - // See SelectParentHelper.jsm. + // See SelectParentHelper.sys.mjs. class MozMenuCaption extends MozMenuBaseMixin(MozXULElement) { static get inheritedAttributes() { return { diff --git a/toolkit/content/widgets/textrecognition.js b/toolkit/content/widgets/textrecognition.js index 887d5767707c..c517f7bfb124 100644 --- a/toolkit/content/widgets/textrecognition.js +++ b/toolkit/content/widgets/textrecognition.js @@ -4,7 +4,7 @@ "use strict"; // This is a UA widget. It runs in per-origin UA widget scope, -// to be loaded by UAWidgetsChild.jsm. +// to be loaded by UAWidgetsChild.sys.mjs. this.TextRecognitionWidget = class { /** diff --git a/toolkit/content/widgets/videocontrols.js b/toolkit/content/widgets/videocontrols.js index 60572ae02653..73a32164aaa5 100644 --- a/toolkit/content/widgets/videocontrols.js +++ b/toolkit/content/widgets/videocontrols.js @@ -5,7 +5,7 @@ "use strict"; // This is a UA widget. It runs in per-origin UA widget scope, -// to be loaded by UAWidgetsChild.jsm. +// to be loaded by UAWidgetsChild.sys.mjs. /* * This is the class of entry. It will construct the actual implementation diff --git a/toolkit/crashreporter/docs/index.rst b/toolkit/crashreporter/docs/index.rst index 464edcf62b1e..fe1af45d8fd9 100644 --- a/toolkit/crashreporter/docs/index.rst +++ b/toolkit/crashreporter/docs/index.rst @@ -155,7 +155,7 @@ with information about the crash. Submission of child process crashes is handled by application code. This code prompts the user to submit crashes in context-appropriate UI and then -submits the crashes using ``CrashSubmit.jsm``. +submits the crashes using ``CrashSubmit.sys.mjs``. Memory Reports ============== diff --git a/toolkit/modules/Console.sys.mjs b/toolkit/modules/Console.sys.mjs index 5fb4f750f41c..c3964fa84066 100644 --- a/toolkit/modules/Console.sys.mjs +++ b/toolkit/modules/Console.sys.mjs @@ -6,7 +6,7 @@ * Define a 'console' API to roughly match the implementation provided by * Firebug. * This module helps cases where code is shared between the web and Firefox. - * See also Browser.jsm for an implementation of other web constants to help + * See also Browser.sys.mjs for an implementation of other web constants to help * sharing code between the web and firefox; * * The API is only be a rough approximation for 3 reasons: diff --git a/toolkit/modules/docs/AsyncShutdown.rst b/toolkit/modules/docs/AsyncShutdown.rst index 8d9e0d4388c2..4b0c5ef0f9ea 100644 --- a/toolkit/modules/docs/AsyncShutdown.rst +++ b/toolkit/modules/docs/AsyncShutdown.rst @@ -58,8 +58,8 @@ The following snippet presents an example of a client of FooService that has a s // Some client of FooService called FooClient - const { FooService } = ChromeUtils.import( - "resource://gre/modules/FooService.jsm" + const { FooService } = ChromeUtils.importESModule( + "resource://gre/modules/FooService.sys.mjs" ); // FooService.shutdown is the `client` capability of a `Barrier`. @@ -117,8 +117,8 @@ The following snippet presents FooClient2, a more sophisticated client of FooSer // Some client of FooService called FooClient2 - const { FooService } = ChromeUtils.import( - "resource://gre/modules/FooService.jsm" + const { FooService } = ChromeUtils.importESModule( + "resource://gre/modules/FooService.sys.mjs" ); FooService.shutdown.addBlocker( diff --git a/toolkit/modules/third_party/fathom/README b/toolkit/modules/third_party/fathom/README index 5f7ba3b4cb4d..7c2f0980fa59 100644 --- a/toolkit/modules/third_party/fathom/README +++ b/toolkit/modules/third_party/fathom/README @@ -14,4 +14,4 @@ In order to regenerate this file, do the following: $ make bundleESModule $ export MOZ_FATHOM="../../mozilla-central/toolkit/modules/third_party/fathom" - $ cat $MOZ_FATHOM/fx-header dist/fathom.js > $MOZ_FATHOM/fathom.jsm + $ cat $MOZ_FATHOM/fx-header dist/fathom.js > $MOZ_FATHOM/fathom.mjs diff --git a/toolkit/modules/third_party/fathom/fathom.mjs b/toolkit/modules/third_party/fathom/fathom.mjs index c1d984a9e3e2..be6001326121 100644 --- a/toolkit/modules/third_party/fathom/fathom.mjs +++ b/toolkit/modules/third_party/fathom/fathom.mjs @@ -1,5 +1,5 @@ /* -DO NOT TOUCH fathom.jsm DIRECTLY. See the README for instructions. +DO NOT TOUCH fathom.mjs DIRECTLY. See the README for instructions. */ /* This Source Code Form is subject to the terms of the Mozilla Public diff --git a/toolkit/mozapps/downloads/DownloadUtils.sys.mjs b/toolkit/mozapps/downloads/DownloadUtils.sys.mjs index 3bf97f3c9e59..6684a7369961 100644 --- a/toolkit/mozapps/downloads/DownloadUtils.sys.mjs +++ b/toolkit/mozapps/downloads/DownloadUtils.sys.mjs @@ -610,7 +610,7 @@ function convertTimeUnitsUnits(timeValue, aIndex) { * Error message to log or an array of strings to concat */ // function log(aMsg) { -// let msg = "DownloadUtils.jsm: " + (aMsg.join ? aMsg.join("") : aMsg); +// let msg = "DownloadUtils.sys.mjs: " + (aMsg.join ? aMsg.join("") : aMsg); // Services.console.logStringMessage(msg); // dump(msg + "\n"); // } diff --git a/toolkit/mozapps/extensions/AddonManager.sys.mjs b/toolkit/mozapps/extensions/AddonManager.sys.mjs index e4e51885cf24..c69cf4029ee9 100644 --- a/toolkit/mozapps/extensions/AddonManager.sys.mjs +++ b/toolkit/mozapps/extensions/AddonManager.sys.mjs @@ -1610,10 +1610,10 @@ var AddonManagerInternal = { // Temporary hack until bug 520124 lands. // We can get here during synchronous startup, at which point it's - // considered unsafe (and therefore disallowed by AddonManager.jsm) to + // considered unsafe (and therefore disallowed by AddonManager.sys.mjs) to // access providers that haven't been initialized yet. Since this is when // XPIProvider is starting up, XPIProvider can't access itself via APIs - // going through AddonManager.jsm. Thankfully, this is the only use + // going through AddonManager.sys.mjs. Thankfully, this is the only use // of this API, and we know it's safe to use this API with both // providers; so we have this hack to allow bypassing the normal // safetey guard. diff --git a/toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs b/toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs index e854e04b3ce2..e53e4af7a483 100644 --- a/toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs +++ b/toolkit/mozapps/extensions/internal/AddonRepository.sys.mjs @@ -78,7 +78,7 @@ import { Log } from "resource://gre/modules/Log.sys.mjs"; const LOGGER_ID = "addons.repository"; // Create a new logger for use by the Addons Repository -// (Requires AddonManager.jsm) +// (Requires AddonManager.sys.mjs) var logger = Log.repository.getLogger(LOGGER_ID); function convertHTMLToPlainText(html) { diff --git a/toolkit/mozapps/extensions/internal/AddonTestUtils.sys.mjs b/toolkit/mozapps/extensions/internal/AddonTestUtils.sys.mjs index 9433278eb6bf..f53d32092dc6 100644 --- a/toolkit/mozapps/extensions/internal/AddonTestUtils.sys.mjs +++ b/toolkit/mozapps/extensions/internal/AddonTestUtils.sys.mjs @@ -298,7 +298,7 @@ export var AddonTestUtils = { // And scan for changes at startup Services.prefs.setIntPref("extensions.startupScanScopes", 15); - // By default, don't cache add-ons in AddonRepository.jsm + // By default, don't cache add-ons in AddonRepository.sys.mjs Services.prefs.setBoolPref("extensions.getAddons.cache.enabled", false); // Point update checks to the local machine for fast failures @@ -1743,7 +1743,7 @@ export var AddonTestUtils = { * @param {object} extension * The return value of ExtensionTestUtils.loadExtension. * For browser tests, see mochitest/tests/SimpleTest/ExtensionTestUtils.js - * For xpcshell tests, see toolkit/components/extensions/ExtensionXPCShellUtils.jsm + * For xpcshell tests, see toolkit/components/extensions/ExtensionXPCShellUtils.sys.mjs * @param {object} [options] * Optional options. * @param {boolean} [options.expectPending = false] diff --git a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.sys.mjs b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.sys.mjs index a3935a26f99e..5b7b10a7641c 100644 --- a/toolkit/mozapps/extensions/internal/AddonUpdateChecker.sys.mjs +++ b/toolkit/mozapps/extensions/internal/AddonUpdateChecker.sys.mjs @@ -26,7 +26,7 @@ import { Log } from "resource://gre/modules/Log.sys.mjs"; const LOGGER_ID = "addons.update-checker"; // Create a new logger for use by the Addons Update Checker -// (Requires AddonManager.jsm) +// (Requires AddonManager.sys.mjs) var logger = Log.repository.getLogger(LOGGER_ID); /** diff --git a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs index 5d1d2c19706b..af0b02444a47 100644 --- a/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs +++ b/toolkit/mozapps/extensions/internal/XPIDatabase.sys.mjs @@ -117,7 +117,7 @@ const nsIFile = Components.Constructor( ); // Create a new logger for use by the Addons XPI Provider Utils -// (Requires AddonManager.jsm) +// (Requires AddonManager.sys.mjs) var logger = Log.repository.getLogger(LOGGER_ID); const FILE_JSON_DB = "extensions.json"; diff --git a/toolkit/mozapps/extensions/internal/XPIInstall.sys.mjs b/toolkit/mozapps/extensions/internal/XPIInstall.sys.mjs index 5f7fba24ad9e..d1167fcf5f9f 100644 --- a/toolkit/mozapps/extensions/internal/XPIInstall.sys.mjs +++ b/toolkit/mozapps/extensions/internal/XPIInstall.sys.mjs @@ -168,7 +168,7 @@ import { Log } from "resource://gre/modules/Log.sys.mjs"; const LOGGER_ID = "addons.xpi"; // Create a new logger for use by all objects in this Addons XPI Provider module -// (Requires AddonManager.jsm) +// (Requires AddonManager.sys.mjs) var logger = Log.repository.getLogger(LOGGER_ID); // Stores the ID of the theme which was selected during the last session, diff --git a/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs b/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs index d5ffd06d1127..12d4fa1172f4 100644 --- a/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs +++ b/toolkit/mozapps/extensions/internal/XPIProvider.sys.mjs @@ -185,7 +185,7 @@ import { Log } from "resource://gre/modules/Log.sys.mjs"; const LOGGER_ID = "addons.xpi"; // Create a new logger for use by all objects in this Addons XPI Provider module -// (Requires AddonManager.jsm) +// (Requires AddonManager.sys.mjs) var logger = Log.repository.getLogger(LOGGER_ID); /** diff --git a/toolkit/mozapps/update/BackgroundUpdate.sys.mjs b/toolkit/mozapps/update/BackgroundUpdate.sys.mjs index 28d0fc853857..3022c9ffde02 100644 --- a/toolkit/mozapps/update/BackgroundUpdate.sys.mjs +++ b/toolkit/mozapps/update/BackgroundUpdate.sys.mjs @@ -570,7 +570,7 @@ export var BackgroundUpdate = { }; try { - // Interacting with `TaskScheduler.jsm` can throw, so we'll catch. + // Interacting with `TaskScheduler.sys.mjs` can throw, so we'll catch. if (!enabled) { lazy.log.info( `${SLUG}: not scheduling background update: '${JSON.stringify( diff --git a/toolkit/mozapps/update/UpdateService.sys.mjs b/toolkit/mozapps/update/UpdateService.sys.mjs index 808946f819bd..34bf1b9e19ae 100644 --- a/toolkit/mozapps/update/UpdateService.sys.mjs +++ b/toolkit/mozapps/update/UpdateService.sys.mjs @@ -193,7 +193,7 @@ const WRITE_ERROR_DIR_ACCESS_DENIED = 68; const WRITE_ERROR_DELETE_BACKUP = 69; const WRITE_ERROR_EXTRACT = 70; -// Error codes 80 through 99 are reserved for UpdateService.jsm and are not +// Error codes 80 through 99 are reserved for UpdateService.sys.mjs and are not // defined in common/updatererrors.h const ERR_UPDATER_CRASHED = 89; const ERR_OLDER_VERSION_OR_SAME_BUILD = 90; @@ -1907,7 +1907,7 @@ function pingStateAndStatusCodes(aUpdate, aStartup, aStatus) { stateCode = 13; break; // Note: Do not use stateCode 14 here. It is defined in - // UpdateTelemetry.jsm + // UpdateTelemetry.sys.mjs default: stateCode = 1; } @@ -3399,7 +3399,7 @@ UpdateService.prototype = { // See Bug 1599590. // Note that we exit unconditionally here if we are only doing manual // update checks, because manual update checking uses a completely - // different code path (AppUpdater.jsm creates its own nsIUpdateChecker), + // different code path (AppUpdater.sys.mjs creates its own nsIUpdateChecker), // bypassing this function completely. AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_DISABLED_BY_POLICY); return false; diff --git a/toolkit/mozapps/update/UpdateTelemetry.sys.mjs b/toolkit/mozapps/update/UpdateTelemetry.sys.mjs index 20fb0ab4a431..f3c350267c9f 100644 --- a/toolkit/mozapps/update/UpdateTelemetry.sys.mjs +++ b/toolkit/mozapps/update/UpdateTelemetry.sys.mjs @@ -316,7 +316,7 @@ export var AUSTLMY = { * This value is also used to determine the key for the keyed scalar * update.bitshresult (key is either "COMPLETE" or "PARTIAL") * @param aError - * The BitsError that occurred. See Bits.jsm for details on BitsError. + * The BitsError that occurred. See Bits.sys.mjs for details on BitsError. */ pingBitsError: function UT_pingBitsError(aIsComplete, aError) { if (AppConstants.platform != "win") { diff --git a/toolkit/mozapps/update/common/updatererrors.h b/toolkit/mozapps/update/common/updatererrors.h index f2663d5b577d..d3abf14ffeac 100644 --- a/toolkit/mozapps/update/common/updatererrors.h +++ b/toolkit/mozapps/update/common/updatererrors.h @@ -10,7 +10,7 @@ #define OK 0 // Error codes that are no longer used should not be used again unless they -// aren't used in client code (e.g. UpdateService.jsm, updates.js, etc.). +// aren't used in client code (e.g. UpdateService.sys.mjs, updates.js, etc.). #define MAR_ERROR_EMPTY_ACTION_LIST 1 #define LOADSOURCE_ERROR_WRONG_SIZE 2 @@ -26,8 +26,8 @@ // Error codes 10-14 are related to memory allocation failures. // Note: If more memory allocation error codes are added, the implementation of -// isMemoryAllocationErrorCode in UpdateService.jsm should be updated to account -// for them. +// isMemoryAllocationErrorCode in UpdateService.sys.mjs should be updated to +// account for them. #define READ_STRINGS_MEM_ERROR 10 #define ARCHIVE_READER_MEM_ERROR 11 #define BSPATCH_MEM_ERROR 12 @@ -49,8 +49,8 @@ // Error codes 24-33 and 49-58 are for the Windows maintenance service. // Note: If more maintenance service error codes are added, the implementations -// of IsServiceSpecificErrorCode in updater.cpp and UpdateService.jsm should be -// updated to account for them. +// of IsServiceSpecificErrorCode in updater.cpp and UpdateService.sys.mjs should +// be updated to account for them. #define SERVICE_UPDATER_COULD_NOT_BE_STARTED 24 #define SERVICE_NOT_ENOUGH_COMMAND_LINE_ARGS 25 #define SERVICE_UPDATER_SIGN_ERROR 26 @@ -79,8 +79,8 @@ // Error codes 24-33 and 49-58 are for the Windows maintenance service. // Note: If more maintenance service error codes are added, the implementations -// of IsServiceSpecificErrorCode in updater.cpp and UpdateService.jsm should be -// updated to account for them. +// of IsServiceSpecificErrorCode in updater.cpp and UpdateService.sys.mjs should +// be updated to account for them. #define SERVICE_COULD_NOT_COPY_UPDATER 49 #define SERVICE_STILL_APPLYING_TERMINATED 50 #define SERVICE_STILL_APPLYING_NO_EXIT_CODE 51 @@ -112,7 +112,7 @@ #define INVALID_CALLBACK_DIR_ERROR 78 #define UPDATE_STATUS_UNCHANGED 79 -// Error codes 80 through 99 are reserved for UpdateService.jsm +// Error codes 80 through 99 are reserved for UpdateService.sys.mjs // The following error codes are only used by updater.exe // when a fallback key exists for tests. @@ -125,6 +125,6 @@ #define SILENT_UPDATE_NEEDED_ELEVATION_ERROR 105 #define WRITE_ERROR_BACKGROUND_TASK_SHARING_VIOLATION 106 -// Error codes 110 and 111 are reserved for UpdateService.jsm +// Error codes 110 and 111 are reserved for UpdateService.sys.mjs #endif // UPDATEERRORS_H diff --git a/toolkit/mozapps/update/docs/BackgroundUpdates.rst b/toolkit/mozapps/update/docs/BackgroundUpdates.rst index 7f97f58c7472..d8a154cb393e 100644 --- a/toolkit/mozapps/update/docs/BackgroundUpdates.rst +++ b/toolkit/mozapps/update/docs/BackgroundUpdates.rst @@ -65,7 +65,7 @@ observe and control these settings. But there are some other pieces of state which absolutely must come from a profile, such as the telemetry client ID and logging level settings (see -`BackgroundTasksUtils.jsm `__). +`BackgroundTasksUtils.sys.mjs `__). This means that, in addition to our per-installation prefs, we also need to be able to identify and load a profile. To do that, we leverage `the profile @@ -137,7 +137,7 @@ API `__. For platform-specific scheduling details, see the -`TaskScheduler.jsm `__ +`TaskScheduler.sys.mjs `__ module. These background tasks are scheduled per OS user and run with that user’s @@ -177,7 +177,7 @@ visible to users: see `bug 1775132 After setting up this profile and reading all the configuration we need into it, the regular -`UpdateService.jsm `__ +`UpdateService.sys.mjs `__ check process is initiated. To the greatest extent possible, this process is identical to what happens during any regular browsing session. diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp index 4b6d847f200b..111609415933 100644 --- a/toolkit/mozapps/update/updater/updater.cpp +++ b/toolkit/mozapps/update/updater/updater.cpp @@ -2704,21 +2704,20 @@ static int ReadMARChannelIDsFromBuffer(char* aChannels, */ static int GetAcceptableChannelIDs(MARChannelStringTable* aMARStrings) { int rv = UPDATE_SETTINGS_FILE_CHANNEL; -#ifdef XP_MACOSX - if (auto marChannels = - UpdateSettingsUtil::GetAcceptedMARChannelsValue()) { +# ifdef XP_MACOSX + if (auto marChannels = UpdateSettingsUtil::GetAcceptedMARChannelsValue()) { rv = ReadMARChannelIDsFromBuffer(marChannels->data(), aMARStrings); } -#else +# else NS_tchar updateSettingsPath[MAXPATHLEN]; NS_tsnprintf(updateSettingsPath, sizeof(updateSettingsPath) / sizeof(updateSettingsPath[0]), NS_T("%s/update-settings.ini"), gInstallDirPath); rv = ReadMARChannelIDsFromPath(updateSettingsPath, aMARStrings); -#endif +# endif return rv == OK ? OK : UPDATE_SETTINGS_FILE_CHANNEL; } -#endif // MOZ_VERIFY_MAR_SIGNATURE +#endif // MOZ_VERIFY_MAR_SIGNATURE static int GetUpdateFileName(NS_tchar* fileName, int maxChars) { NS_tsnprintf(fileName, maxChars, NS_T("%s/update.mar"), gPatchDirPath); @@ -2999,8 +2998,8 @@ int NS_main(int argc, NS_tchar** argv) { printf("Error: %d\n", rv); return 1; #else - printf("Not Applicable: No support for signature verification\n"); - return 0; + printf("Not Applicable: No support for signature verification\n"); + return 0; #endif } @@ -3783,7 +3782,7 @@ int NS_main(int argc, NS_tchar** argv) { } // Set an error so we don't get into an update loop when the callback // runs. This will be reset to pending by handleUpdateFailure in - // UpdateService.jsm. + // UpdateService.sys.mjs. WriteStatusFile(SILENT_UPDATE_NEEDED_ELEVATION_ERROR); LOG(("Skipping update to avoid UAC prompt from background task.")); output_finish(); diff --git a/toolkit/themes/shared/global-shared.css b/toolkit/themes/shared/global-shared.css index 178eab24f2d5..320245afbefd 100644 --- a/toolkit/themes/shared/global-shared.css +++ b/toolkit/themes/shared/global-shared.css @@ -360,7 +360,7 @@ button.text-link .button-text { --panel-padding: 0; --panel-background: rgba(249,249,250,.8) no-repeat center var(--autoscroll-background-image); --panel-shadow-margin: 4px; - /* Set pointer-events: none; so that mousemove events can be handled by AutoScrollChild.jsm. */ + /* Set pointer-events: none; so that mousemove events can be handled by AutoScrollChild.sys.mjs. */ pointer-events: none; }