From c514f6c7cb5c3c42ff1c2320f7e65bd48c5454f1 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Wed, 27 Apr 2022 08:38:33 +0000 Subject: [PATCH] Bug 1766238 - Stop using the target argument for ChromeUtils.import in ExtensionCommon.jsm. r=robwu Differential Revision: https://phabricator.services.mozilla.com/D144557 --- toolkit/components/extensions/ExtensionCommon.jsm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolkit/components/extensions/ExtensionCommon.jsm b/toolkit/components/extensions/ExtensionCommon.jsm index 45823defe4d0..717da81ef02d 100644 --- a/toolkit/components/extensions/ExtensionCommon.jsm +++ b/toolkit/components/extensions/ExtensionCommon.jsm @@ -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, {