Bug 1314429 - Allow every add-on to run on e10s, except those explictly marked with multiprocessCompatible=false. r=mconley draft
authorFelipe Gomes <felipc@gmail.com>
Thu, 10 Nov 2016 17:57:07 -0200
changeset 437370 cce8f142747384d0808d6c65ead54ae27a191db3
parent 437369 70373ca1b5bea0015ff29d644316c44477d5675f
child 536618 8f2e4d405b2fc6334caff13b3cb39dc4209ec0dc
push id35389
push userfelipc@gmail.com
push dateThu, 10 Nov 2016 19:57:46 +0000
reviewersmconley
bugs1314429
milestone51.0a2
Bug 1314429 - Allow every add-on to run on e10s, except those explictly marked with multiprocessCompatible=false. r=mconley There's also an existing blocklist of add-ons in bootstrap.js that currently only includes TabMixPlus MozReview-Commit-ID: d5DIqFmaji
browser/extensions/e10srollout/bootstrap.js
browser/extensions/e10srollout/install.rdf.in
toolkit/mozapps/extensions/internal/E10SAddonsRollout.jsm
--- a/browser/extensions/e10srollout/bootstrap.js
+++ b/browser/extensions/e10srollout/bootstrap.js
@@ -12,17 +12,17 @@ Cu.import("resource://gre/modules/Update
 
  // The amount of people to be part of e10s
 const TEST_THRESHOLD = {
   "beta"    : 0.5,  // 50%
   "release" : 1.0,  // 100%
 };
 
 const ADDON_ROLLOUT_POLICY = {
-  "beta"    : "50allmpc", // Any WebExtension or addon with mpc = true
+  "beta"    : "51alladdons", // Any WebExtension or addon with mpc = true
   "release" : "50allmpc", // Any WebExtension or addon with mpc = true
 };
 
 const PREF_COHORT_SAMPLE       = "e10s.rollout.cohortSample";
 const PREF_COHORT_NAME         = "e10s.rollout.cohort";
 const PREF_E10S_OPTED_IN       = "browser.tabs.remote.autostart";
 const PREF_E10S_FORCE_ENABLED  = "browser.tabs.remote.force-enable";
 const PREF_E10S_FORCE_DISABLED = "browser.tabs.remote.force-disable";
--- a/browser/extensions/e10srollout/install.rdf.in
+++ b/browser/extensions/e10srollout/install.rdf.in
@@ -5,17 +5,17 @@
 
 #filter substitution
 
 <RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:em="http://www.mozilla.org/2004/em-rdf#">
 
   <Description about="urn:mozilla:install-manifest">
     <em:id>e10srollout@mozilla.org</em:id>
-    <em:version>1.5</em:version>
+    <em:version>1.6</em:version>
     <em:type>2</em:type>
     <em:bootstrap>true</em:bootstrap>
     <em:multiprocessCompatible>true</em:multiprocessCompatible>
 
     <!-- Target Application this theme can install into,
         with minimum and maximum supported versions. -->
     <em:targetApplication>
       <Description>
--- a/toolkit/mozapps/extensions/internal/E10SAddonsRollout.jsm
+++ b/toolkit/mozapps/extensions/internal/E10SAddonsRollout.jsm
@@ -195,16 +195,18 @@ const RolloutPolicy = {
   "49limitedb": { addons: set49PaneOnly, webextensions: false },
 
   // Beta testing on 50
   "50allmpc": { addons: [], webextensions: true, mpc: true },
 
   "50a": { addons: set50Release, webextensions: true },
   "50b": { addons: set50Release, webextensions: false },
 
+  "51alladdons": { addons: [], webextensions: true, alladdons: true },
+
   "xpcshell-test": { addons: [ADDONS.test1, ADDONS.test2], webextensions: false },
 };
 
 Object.defineProperty(this, "isAddonPartOfE10SRollout", {
   configurable: false,
   enumerable: false,
   writable: false,
   value: function isAddonPartOfE10SRollout(aAddon) {
@@ -216,16 +218,24 @@ Object.defineProperty(this, "isAddonPart
     }
 
     if (blocklist && blocklist.indexOf(aAddon.id) > -1) {
       return false;
     }
 
     let policy = RolloutPolicy[policyId];
 
+    if (policy.alladdons) {
+      if (aAddon.multiprocessCompatible === false) {
+        return false;
+      }
+
+      return true;
+    }
+
     if (policy.webextensions && aAddon.type == "webextension") {
       return true;
     }
 
     if (policy.mpc && aAddon.multiprocessCompatible) {
       return true;
     }