Bug 1359495 - Expose webextension status in the multi cohorts. r=Felipe, a=gchang
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 25 Apr 2017 13:59:16 -0700
changeset 396069 44acbe6acc81f1fac6d52aa94bc1aec9ef1978cd
parent 396068 f825d935914655487138fb5934ed10d933ae0da0
child 396070 1475c20357cf9d509a7cc7ef80fad4deeaac3ba6
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe, gchang
bugs1359495
milestone54.0
Bug 1359495 - Expose webextension status in the multi cohorts. r=Felipe, a=gchang
browser/extensions/e10srollout/bootstrap.js
--- a/browser/extensions/e10srollout/bootstrap.js
+++ b/browser/extensions/e10srollout/bootstrap.js
@@ -170,29 +170,36 @@ function defineCohort() {
       !inMultiExperiment ||
       userOptedIn.multi ||
       disqualified ||
       getAddonsDisqualifyForMulti()) {
     Preferences.reset(PREF_E10S_PROCESSCOUNT + ".web");
     return;
   }
 
+  // If we got here with a cohortPrefix, it must be "addons-set50allmpc-",
+  // and we know because of getAddonsDisqualifyForMulti that the addons that
+  // are installed must be web extensions.
+  if (cohortPrefix) {
+    cohortPrefix = "webextensions-";
+  }
+
   // The user is in the multi experiment!
   // Decide how many content processes to use for this user.
   let BUCKETS = {
     1: .25,
     2: .5,
     4: .75,
     8: 1
   };
 
   let multiUserSample = getUserSample(true);
   for (let sampleName of Object.getOwnPropertyNames(BUCKETS)) {
     if (multiUserSample < BUCKETS[sampleName]) {
-      setCohort(`multiBucket${sampleName}`);
+      setCohort(`${cohortPrefix}multiBucket${sampleName}`);
       Preferences.set(PREF_E10S_PROCESSCOUNT + ".web", sampleName);
       break;
     }
   }
 }
 
 function shutdown(data, reason) {
 }