Bug 1795322 - Update toolkit modules references in remaining places. r=mossop,zeid,geckoview-reviewers,calu

Differential Revision: https://phabricator.services.mozilla.com/D160036
This commit is contained in:
Mark Banner 2022-10-26 08:06:37 +00:00
parent 076892e252
commit 7f3cba09e8
12 changed files with 19 additions and 19 deletions

View file

@ -14,6 +14,6 @@ Examples of incorrect code for this rule:
globalThis.foo = 10;
Object.defineProperty(globalThis, "bar", { value: 20});
XPCOMUtils.defineLazyModuleGetters(globalThis, {
AppConstants: "resource://gre/modules/AppConstants.jsm",
ChromeUtils.defineESModuleGetters(globalThis, {
AppConstants: "resource://gre/modules/AppConstants.sys.mjs",
});

View file

@ -550,7 +550,7 @@ more](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structure
without having to do conversions for JSON compatibility.
A Promise-based wrapper for IndexedDB,
[IndexedDB.jsm](http://searchfox.org/mozilla-central/source/toolkit/modules/IndexedDB.jsm)
[IndexedDB.sys.mjs](http://searchfox.org/mozilla-central/source/toolkit/modules/IndexedDB.sys.mjs)
is available for chrome code.
## Test on weak hardware

View file

@ -71,7 +71,7 @@ SimpleTest.waitForFocus(async function() {
var state = contextMenu.state;
// Select Language from the menu. Take a look at
// toolkit/modules/InlineSpellChecker.jsm to see how the menu works.
// toolkit/modules/InlineSpellChecker.sys.mjs to see how the menu works.
contextMenu.ownerDocument.getElementById("spell-check-dictionary-en-US")
.doCommand();
contextMenu.hidePopup();

View file

@ -320,7 +320,7 @@ process there.
<https://searchfox.org/mozilla-central/rev/d4b9c457db637fde655592d9e2048939b7ab2854/toolkit/locales/en-US/toolkit/global/processTypes.ftl#39-57>`_
for your process, if needed
- Hashmap from process type to user-facing string above in `const ProcessType
<https://searchfox.org/mozilla-central/rev/d4b9c457db637fde655592d9e2048939b7ab2854/toolkit/modules/ProcessType.jsm#14-20>`_
<https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/ProcessType.sys.mjs#10-16`_
- For `about:processes` you will probably want to follow the following steps:
+ Add handling for your new process type producing a unique `fluentName <https://searchfox.org/mozilla-central/rev/be4604e4be8c71b3c1dbff2398a5b05f15411673/toolkit/components/aboutprocesses/content/aboutProcesses.js#472-539>`_, i.e., constructing a dynamic name is highly discouraged

View file

@ -47,8 +47,8 @@ This tutorial was tested against Firefox 58 Beta and Nightly. It does not work i
const { addDebuggerToGlobal } = ChromeUtils.importESModule(
"resource://gre/modules/jsdebugger.sys.mjs"
);
const { console } = ChromeUtils.import(
"resource://gre/modules/Console.jsm"
const { console } = ChromeUtils.importESModule(
"resource://gre/modules/Console.sys.mjs"
);
// This simply defines 'Debugger' in this Scratchpad;

View file

@ -374,7 +374,7 @@ export var GeckoViewUtils = {
/**
* Add logging functions to the specified scope that forward to the given
* Log.jsm logger. Currently "debug" and "warn" functions are supported. To
* Log.sys.mjs logger. Currently "debug" and "warn" functions are supported. To
* log something, call the function through a template literal:
*
* function foo(bar, baz) {

View file

@ -231,7 +231,7 @@ activity.
### about:support
about:support contains an "Important Modified Preferences" table. It contains
all prefs that (a) have had their value changed from the default, and (b) whose
prefix match a allowlist in `Troubleshoot.jsm`. The allowlist matching is to
prefix match a allowlist in `Troubleshoot.sys.mjs`. The allowlist matching is to
avoid exposing pref values that might be privacy-sensitive.
**Problem:** The allowlist of prefixes is specified separately from the prefs

View file

@ -666,7 +666,7 @@ pref("toolkit.scrollbox.smoothScroll", true);
pref("toolkit.scrollbox.scrollIncrement", 20);
pref("toolkit.scrollbox.clickToScroll.scrollDelay", 150);
// Controls logging for Sqlite.jsm.
// Controls logging for Sqlite.sys.mjs.
pref("toolkit.sqlitejsm.loglevel", "Error");
pref("toolkit.tabbox.switchByScrolling", false);

View file

@ -2231,7 +2231,7 @@ modules:
includes:
# TODO
# Implementation and consumers of Private Browsing APIs in nsILoadContext,
# nsIPrivateBrowsingChannel, PrivateBrowsingUtils.jsm and the related glue code. '
# nsIPrivateBrowsingChannel, PrivateBrowsingUtils.sys.mjs and the related glue code. '
meta:
owners_emeritus:
- Ehsan Akhgari

View file

@ -334,10 +334,10 @@ class TestUrlFinder(unittest.TestCase):
"browser/base/content/license.html",
None,
],
"dist/bin/modules/AppConstants.jsm": [
"toolkit/modules/AppConstants.jsm",
"dist/bin/modules/AppConstants.sys.mjs": [
"toolkit/modules/AppConstants.sys.mjs",
{
"101,102": ["toolkit/modules/AppConstants.jsm", 135],
"101,102": ["toolkit/modules/AppConstants.sys.mjs", 135],
},
],
},
@ -422,11 +422,11 @@ class TestUrlFinder(unittest.TestCase):
),
# Path with pp_info
(
"resource://gre/modules/AppConstants.jsm",
"resource://gre/modules/AppConstants.sys.mjs",
(
"toolkit/modules/AppConstants.jsm",
"toolkit/modules/AppConstants.sys.mjs",
{
"101,102": ["toolkit/modules/AppConstants.jsm", 135],
"101,102": ["toolkit/modules/AppConstants.sys.mjs", 135],
},
),
),

View file

@ -39,7 +39,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => {
return new ConsoleAPI({
prefix: "RemoteSecuritySettings.jsm",
// tip: set maxLogLevel to "debug" and use log.debug() to create detailed
// messages during development. See LOG_LEVELS in Console.jsm for details.
// messages during development. See LOG_LEVELS in Console.sys.mjs for details.
maxLogLevel: "error",
maxLogLevelPref: LOGLEVEL_PREF,
});

View file

@ -96,7 +96,7 @@ SandboxReporter* SandboxReporter::Singleton() {
// thread before freeing anything, IPC should already be shut down
// by that point (so it won't race by calling Singleton()), all
// non-main XPCOM threads will also be shut down, and currently
// the only other user is the main-thread-only Troubleshoot.jsm.
// the only other user is the main-thread-only Troubleshoot.sys.mjs.
NS_DispatchToMainThread(NS_NewRunnableFunction(
"SandboxReporter::Singleton", [] { ClearOnShutdown(&sSingleton); }));
}