зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1795322 - Update toolkit modules references in services code. r=bdk
Differential Revision: https://phabricator.services.mozilla.com/D160027
This commit is contained in:
Родитель
6b6069c609
Коммит
7efc75ed17
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче