Bug 1792880 - Port bug 1779982: Migrate Places imports to ESM. r=mkmelin

../mach tb-esmify --upstream-imports . --prefix=toolkit/components/places/

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

--HG--
extra : amend_source : 8dea2446f25e3a8ef4ac0413471cb34ae139b570
This commit is contained in:
Rob Lemley 2022-09-30 20:43:16 +10:00
Родитель eac0863d13
Коммит 7e3dc03bca
7 изменённых файлов: 19 добавлений и 19 удалений

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

@ -7,8 +7,8 @@
/* import-globals-from mailWindow.js */
/* import-globals-from utilityOverlay.js */
var { PlacesUtils } = ChromeUtils.import(
"resource://gre/modules/PlacesUtils.jsm"
var { PlacesUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PlacesUtils.sys.mjs"
);
var { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"

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

@ -16,12 +16,16 @@ var { XPCOMUtils } = ChromeUtils.import(
);
var LazyModules = {};
ChromeUtils.defineESModuleGetters(LazyModules, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
XPCOMUtils.defineLazyModuleGetters(LazyModules, {
ConversationOpener: "resource:///modules/ConversationOpener.jsm",
MailUtils: "resource:///modules/MailUtils.jsm",
MessageArchiver: "resource:///modules/MessageArchiver.jsm",
PhishingDetector: "resource:///modules/PhishingDetector.jsm",
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
TagUtils: "resource:///modules/TagUtils.jsm",
});

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

@ -13,8 +13,8 @@
var { InlineSpellChecker, SpellCheckHelper } = ChromeUtils.import(
"resource://gre/modules/InlineSpellChecker.jsm"
);
var { PlacesUtils } = ChromeUtils.import(
"resource://gre/modules/PlacesUtils.jsm"
var { PlacesUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PlacesUtils.sys.mjs"
);
var { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"

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

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var { PlacesUtils } = ChromeUtils.import(
"resource://gre/modules/PlacesUtils.jsm"
var { PlacesUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PlacesUtils.sys.mjs"
);
var { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"

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

@ -7,8 +7,8 @@
var { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
var { PlacesUtils } = ChromeUtils.import(
"resource://gre/modules/PlacesUtils.jsm"
var { PlacesUtils } = ChromeUtils.importESModule(
"resource://gre/modules/PlacesUtils.sys.mjs"
);
var gShowBiDi = false;

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

@ -34,11 +34,9 @@ ChromeUtils.defineModuleGetter(
"PluralForm",
"resource://gre/modules/PluralForm.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"PlacesDBUtils",
"resource://gre/modules/PlacesDBUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
PlacesDBUtils: "resource://gre/modules/PlacesDBUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
this,
"ProcessType",

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

@ -18,11 +18,9 @@ ChromeUtils.defineModuleGetter(
"DeferredTask",
"resource://gre/modules/DeferredTask.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm"
);
ChromeUtils.defineESModuleGetters(this, {
PlacesUtils: "resource://gre/modules/PlacesUtils.sys.mjs",
});
ChromeUtils.defineModuleGetter(
this,
"OSKeyStore",