Bug 1795322 - Update toolkit modules references in services code. r=bdk

Differential Revision: https://phabricator.services.mozilla.com/D160027
This commit is contained in:
Mark Banner 2022-10-25 19:49:24 +00:00
Родитель 6b6069c609
Коммит 7efc75ed17
7 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -14,7 +14,7 @@ add_task(async function test_sqlite_shutdown() {
path: "kinto.sqlite",
});
// Shutdown Sqlite.jsm synchronously.
// Shutdown Sqlite.sys.mjs synchronously.
Services.prefs.setBoolPref("toolkit.asyncshutdown.testing", true);
AsyncShutdown.profileBeforeChange._trigger();
Services.prefs.clearUserPref("toolkit.asyncshutdown.testing");

Просмотреть файл

@ -22,7 +22,7 @@
// from Firefox browser code, hence the presence of these privileged browser APIs.
// If you're trying to use this from ordinary web content you're in for a bad time.
const {setTimeout} = ChromeUtils.import("resource://gre/modules/Timer.jsm");
const {setTimeout} = ChromeUtils.importESModule("resource://gre/modules/Timer.sys.mjs");
// We cannot use WebSocket from chrome code without a window,
// see https://bugzilla.mozilla.org/show_bug.cgi?id=784686
const browser = Services.appShell.createWindowlessBrowser(true);

Просмотреть файл

@ -120,7 +120,7 @@ function getErrorDetails(error) {
.replace(/\/.*\//gm, "[REDACTED]");
let details = { message: cleanMessage, stack: null };
// Adapted from Console.jsm.
// Adapted from Console.sys.mjs.
if (error.stack) {
let frames = [];
for (let frame = error.stack; frame; frame = frame.caller) {

Просмотреть файл

@ -4,7 +4,7 @@
#include "nsISupports.idl"
// Adapts a `Log.jsm` logger so that it can be used from native (Rust) code.
// Adapts a `Log.sys.mjs` logger so that it can be used from native (Rust) code.
// The synced bookmarks mirror and bridged engines implement this interface
// to hook in to the services `LogManager` infrastructure.
[scriptable, uuid(c92bfe0d-50b7-4a7f-9686-fe5335a696b9)]

Просмотреть файл

@ -34,7 +34,8 @@ XPCOMUtils.defineLazyServiceGetter(
);
// Create a new instance of the ConsoleAPI so we can control the maxLogLevel with a pref.
// See LOG_LEVELS in Console.jsm. Common examples: "all", "debug", "info", "warn", "error".
// See LOG_LEVELS in Console.sys.mjs. Common examples: "all", "debug", "info",
// "warn", "error".
const log = (() => {
const { ConsoleAPI } = ChromeUtils.importESModule(
"resource://gre/modules/Console.sys.mjs"

Просмотреть файл

@ -26,7 +26,7 @@ impl Default for LogSink {
impl LogSink {
/// Creates a log sink that adapts the Rust `log` crate to the Sync
/// `Log.jsm` logger.
/// `Log.sys.mjs` logger.
///
/// This is copied from `bookmark_sync::Logger`. It would be nice to share
/// these, but, for now, we've just duplicated it to make prototyping

Просмотреть файл

@ -149,7 +149,7 @@ class InterruptedError extends Error {
}
/**
* Adapts a `Log.jsm` logger to a `mozIServicesLogSink`. This class is copied
* Adapts a `Log.sys.mjs` logger to a `mozIServicesLogSink`. This class is copied
* from `SyncedBookmarksMirror.jsm`.
*/
class LogAdapter {