Bug 1286712 - Remove unused ExtensionContext and GlobalManager globals
The presence of these globals interfere with the attempt to get ext-*.js
scripts to load in a content process because these globals are only
available in the main process.
MozReview-Commit-ID: 7syjAGcuUnu
--- a/toolkit/components/extensions/.eslintrc
+++ b/toolkit/components/extensions/.eslintrc
@@ -7,21 +7,19 @@
"Components": true,
"Cr": true,
"Cu": true,
"dump": true,
"TextDecoder": false,
"TextEncoder": false,
// Specific to WebExtensions:
"Extension": true,
- "ExtensionContext": true,
"ExtensionManagement": true,
"extensions": true,
"global": true,
- "GlobalManager": true,
"NetUtil": true,
"openOptionsPage": true,
"require": false,
"runSafe": true,
"runSafeSync": true,
"runSafeSyncWithoutClone": true,
"Services": true,
"TabManager": true,
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -140,20 +140,18 @@ var Management = {
promises.push(Schemas.load(url));
}
return Promise.all(promises);
});
for (let [/* name */, value] of XPCOMUtils.enumerateCategoryEntries(CATEGORY_EXTENSION_SCRIPTS)) {
let scope = {
get console() { return console; },
- ExtensionContext,
extensions: this,
global: scriptScope,
- GlobalManager,
require,
};
Services.scriptloader.loadSubScript(value, scope, "UTF-8");
// Save the scope to avoid it being garbage collected.
this.scopes.push(scope);
}