зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1766238 - Stop using the target argument for ChromeUtils.import in ExtensionCommon.jsm. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D144557
This commit is contained in:
Родитель
7da4eba9e8
Коммит
c514f6c7cb
|
@ -23,6 +23,7 @@ const { XPCOMUtils } = ChromeUtils.import(
|
|||
XPCOMUtils.defineLazyGlobalGetters(this, ["fetch"]);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
AppConstants: "resource://gre/modules/AppConstants.jsm",
|
||||
ConsoleAPI: "resource://gre/modules/Console.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
Schemas: "resource://gre/modules/Schemas.jsm",
|
||||
|
@ -1806,6 +1807,7 @@ class SchemaAPIManager extends EventEmitter {
|
|||
);
|
||||
|
||||
Object.assign(global, {
|
||||
AppConstants,
|
||||
Cc,
|
||||
ChromeWorker,
|
||||
Ci,
|
||||
|
@ -1825,8 +1827,6 @@ class SchemaAPIManager extends EventEmitter {
|
|||
global,
|
||||
});
|
||||
|
||||
ChromeUtils.import("resource://gre/modules/AppConstants.jsm", global);
|
||||
|
||||
XPCOMUtils.defineLazyGetter(global, "console", getConsole);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(global, {
|
||||
|
|
Загрузка…
Ссылка в новой задаче