Bug 1817743 - Port bug 1817183: Convert imports of services/fxaccounts to es modules. r=darktrojan

Differential Revision: https://phabricator.services.mozilla.com/D170331

--HG--
extra : rebase_source : a5bd46e83cc3be4fb7b0498f502722f3e10f92cd
This commit is contained in:
Martin Giger 2023-02-21 21:33:49 +11:00
Родитель b57101c9af
Коммит e029583d2a
4 изменённых файлов: 12 добавлений и 19 удалений

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

@ -8,17 +8,10 @@
/* import-globals-from utilityOverlay.js */
ChromeUtils.defineModuleGetter(
this,
"FxAccounts",
"resource://gre/modules/FxAccounts.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"EnsureFxAccountsWebChannel",
"resource://gre/modules/FxAccountsWebChannel.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
EnsureFxAccountsWebChannel:
"resource://gre/modules/FxAccountsWebChannel.sys.mjs",
FxAccounts: "resource://gre/modules/FxAccounts.sys.mjs",
UIState: "resource://services-sync/UIState.sys.mjs",
Weave: "resource://services-sync/main.sys.mjs",
});
@ -142,8 +135,8 @@ var gSync = {
}
}
let fxAccounts = ChromeUtils.import(
"resource://gre/modules/FxAccounts.jsm"
let fxAccounts = ChromeUtils.importESModule(
"resource://gre/modules/FxAccounts.sys.mjs"
).getFxAccountsSingleton();
if (disconnectAccount) {

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

@ -120,10 +120,10 @@ const startupPhases = {
"resource:///modules/mimeParser.jsm",
"resource://gre/modules/BookmarkHTMLUtils.sys.mjs",
"resource://gre/modules/Bookmarks.sys.mjs",
"resource://gre/modules/ContextualIdentityService.jsm",
"resource://gre/modules/ContextualIdentityService.sys.mjs",
"resource://gre/modules/CrashSubmit.jsm",
"resource://gre/modules/FxAccounts.jsm",
"resource://gre/modules/FxAccountsStorage.jsm",
"resource://gre/modules/FxAccounts.sys.mjs",
"resource://gre/modules/FxAccountsStorage.sys.mjs",
"resource://gre/modules/PlacesBackups.sys.mjs",
"resource://gre/modules/PlacesSyncUtils.sys.mjs",
"resource://gre/modules/PushComponents.jsm",

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

@ -9,8 +9,8 @@ ChromeUtils.defineESModuleGetters(this, {
Weave: "resource://services-sync/main.sys.mjs",
});
var { FxAccounts, getFxAccountsSingleton } = ChromeUtils.import(
"resource://gre/modules/FxAccounts.jsm"
var { FxAccounts, getFxAccountsSingleton } = ChromeUtils.importESModule(
"resource://gre/modules/FxAccounts.sys.mjs"
);
var fxAccounts = getFxAccountsSingleton();

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

@ -6,8 +6,8 @@ const { MockRegistrar } = ChromeUtils.importESModule(
"resource://testing-common/MockRegistrar.sys.mjs"
);
const { FxAccounts } = ChromeUtils.import(
"resource://gre/modules/FxAccounts.jsm"
const { FxAccounts } = ChromeUtils.importESModule(
"resource://gre/modules/FxAccounts.sys.mjs"
);
FxAccounts.config.promiseConnectAccountURI = entryPoint =>
`https://example.org/?page=connect&entryPoint=${entryPoint}`;