Bug 1255013 - Tag disqualified cohorts in e10s staged rollout. r=Mossop a=lizzard
authorFelipe Gomes <felipc@gmail.com>
Wed, 16 Mar 2016 17:31:47 -0300
changeset 323532 3fc13868be73dc37be1b8164540467fd554631a1
parent 323531 04a77624807ac4866687e5d07848dfcb5788b95c
child 323533 e2460ecc2ca1a38f817b2997abb1618f53394fba
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop, lizzard
bugs1255013
milestone47.0a2
Bug 1255013 - Tag disqualified cohorts in e10s staged rollout. r=Mossop a=lizzard MozReview-Commit-ID: HPUWZzFUegs
browser/extensions/e10srollout/bootstrap.js
--- a/browser/extensions/e10srollout/bootstrap.js
+++ b/browser/extensions/e10srollout/bootstrap.js
@@ -1,16 +1,17 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Preferences.jsm");
+Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/UpdateUtils.jsm");
 
  // The amount of people to be part of e10s, in %
 const TEST_THRESHOLD = {
   "beta"    : 50,
   "release" : 0,
 };
 
@@ -50,22 +51,25 @@ function defineCohort() {
   let updateChannel = UpdateUtils.getUpdateChannel(false);
   if (!(updateChannel in TEST_THRESHOLD)) {
     setCohort("unsupportedChannel");
     return;
   }
 
   let userOptedOut = optedOut();
   let userOptedIn = optedIn();
+  let disqualified = (Services.appinfo.multiprocessBlockPolicy != 0);
   let testGroup = (getUserSample() < TEST_THRESHOLD[updateChannel]);
 
   if (userOptedOut) {
     setCohort("optedOut");
   } else if (userOptedIn) {
     setCohort("optedIn");
+  } else if (disqualified) {
+    setCohort("disqualified");
   } else if (testGroup) {
     setCohort("test");
     Preferences.set(PREF_TOGGLE_E10S, true);
   } else {
     setCohort("control");
     Preferences.reset(PREF_TOGGLE_E10S);
   }
 }