зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1884623 - Update more jsm references in production code and docs in toolkit/. r=mossop,extension-reviewers,desktop-theme-reviewers,application-update-reviewers,credential-management-reviewers,places-reviewers,reusable-components-reviewers,translations-reviewers,omc-reviewers,robwu,Dexter,mconley,aminomancer,emilio,bytesized,sgalich,hjones
Differential Revision: https://phabricator.services.mozilla.com/D204186
This commit is contained in:
Родитель
3d5bb40f49
Коммит
bf97e1553b
|
@ -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");
|
||||
|
|
|
@ -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<VTTCue>} array of active cues
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -17,7 +17,7 @@ let logConsole;
|
|||
function log(msg) {
|
||||
if (!logConsole) {
|
||||
logConsole = console.createInstance({
|
||||
prefix: "** PrincipalsCollector.jsm",
|
||||
prefix: "PrincipalsCollector",
|
||||
maxLogLevelPref: "browser.sanitizer.loglevel",
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)`,
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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:
|
||||
-----------
|
||||
|
|
|
@ -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 <https://searchfox.org/mozilla-central/search?q=symbol:Schemas%23inject&redirect=false>`_),
|
||||
Schemas.sys.mjs <https://searchfox.org/mozilla-central/search?q=symbol:Schemas%23inject&redirect=false>`_),
|
||||
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.
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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?.();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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`.
|
||||
//!
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
* ```
|
||||
*
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,7 +722,10 @@ export var Bookmarks = Object.freeze({
|
|||
Math.max(item.lastModified, updateInfo.dateAdded)
|
||||
);
|
||||
}
|
||||
updateInfo = validateBookmarkObject("Bookmarks.jsm: update", updateInfo, {
|
||||
updateInfo = validateBookmarkObject(
|
||||
"Bookmarks.sys.mjs: update",
|
||||
updateInfo,
|
||||
{
|
||||
url: { validIf: () => item.type == this.TYPE_BOOKMARK },
|
||||
title: {
|
||||
validIf: () =>
|
||||
|
@ -735,10 +738,11 @@ export var Bookmarks = Object.freeze({
|
|||
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
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
},
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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(
|
||||
`
|
||||
|
|
|
@ -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(
|
||||
`
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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 <https://searchfox.org/mozilla-central/source/toolkit/components/windowwatcher/nsIPromptService.idl>`_.
|
||||
|
||||
|
|
|
@ -1058,7 +1058,7 @@ class ModalPrompter {
|
|||
closed = true;
|
||||
});
|
||||
Services.tm.spinEventLoopUntilOrQuit(
|
||||
"prompts/Prompter.jsm:openPromptSync",
|
||||
"prompts/Prompter.sys.mjs:openPromptSync",
|
||||
() => closed
|
||||
);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ var logConsole;
|
|||
function log(msg) {
|
||||
if (!logConsole) {
|
||||
logConsole = console.createInstance({
|
||||
prefix: "RFPHelper.jsm",
|
||||
prefix: "RFPHelper",
|
||||
maxLogLevelPref: "privacy.resistFingerprinting.jsmloglevel",
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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 = {});
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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 = (() => {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
};
|
||||
|
||||
// The <menucaption> element is used for rendering <html:optgroup> inside of <html:select>,
|
||||
// See SelectParentHelper.jsm.
|
||||
// See SelectParentHelper.sys.mjs.
|
||||
class MozMenuCaption extends MozMenuBaseMixin(MozXULElement) {
|
||||
static get inheritedAttributes() {
|
||||
return {
|
||||
|
|
|
@ -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 {
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
==============
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
// }
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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);
|
||||
|
||||
/**
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
||||
/**
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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") {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 <https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/BackgroundTasksUtils.jsm>`__).
|
||||
`BackgroundTasksUtils.sys.mjs <https://searchfox.org/mozilla-central/source/toolkit/components/backgroundtasks/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 <https://docs.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-star
|
|||
on macOS this will use
|
||||
`launchd <https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html>`__.
|
||||
For platform-specific scheduling details, see the
|
||||
`TaskScheduler.jsm <https://searchfox.org/mozilla-central/source/toolkit/components/taskscheduler/TaskScheduler.jsm>`__
|
||||
`TaskScheduler.sys.mjs <https://searchfox.org/mozilla-central/source/toolkit/components/taskscheduler/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 <https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/UpdateService.jsm>`__
|
||||
`UpdateService.sys.mjs <https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/UpdateService.sys.mjs>`__
|
||||
check process is initiated. To the greatest extent possible, this process is
|
||||
identical to what happens during any regular browsing session.
|
||||
|
||||
|
|
|
@ -2705,8 +2705,7 @@ static int ReadMARChannelIDsFromBuffer(char* aChannels,
|
|||
static int GetAcceptableChannelIDs(MARChannelStringTable* aMARStrings) {
|
||||
int rv = UPDATE_SETTINGS_FILE_CHANNEL;
|
||||
# ifdef XP_MACOSX
|
||||
if (auto marChannels =
|
||||
UpdateSettingsUtil::GetAcceptedMARChannelsValue()) {
|
||||
if (auto marChannels = UpdateSettingsUtil::GetAcceptedMARChannelsValue()) {
|
||||
rv = ReadMARChannelIDsFromBuffer(marChannels->data(), aMARStrings);
|
||||
}
|
||||
# else
|
||||
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче