Bug 1286712 - Remove unused ExtensionContext and GlobalManager globals draft
authorRob Wu <rob@robwu.nl>
Tue, 16 Aug 2016 22:05:05 -0700
changeset 403583 47bf953c1f077f146942f580eeb842778aced6bf
parent 403582 b7ebfdf5bace22d5341300cdd4e91ff5e544176b
child 528941 3248631cca0a86675dd0043f6c226e0b24a4125e
push id26949
push userbmo:rob@robwu.nl
push dateSat, 20 Aug 2016 01:26:39 +0000
bugs1286712
milestone51.0a1
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
toolkit/components/extensions/.eslintrc
toolkit/components/extensions/Extension.jsm
--- 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);
     }