Bug 1351425 - Only temp. qualify for e10s when enabled at <100%. r=Felipe
This tweaks the temporary qualification step (currently used only for DevTools)
so that it does not apply on channels that are 100% enabled anyway. This does
not change how many users receive e10s on, it only tweaks who falls into which
cohort, since there's no reason to push all DevTools users to a special cohort
if everyone would have received e10s on anyway.
MozReview-Commit-ID: 5Yn6M50Ny1w
--- a/browser/extensions/e10srollout/bootstrap.js
+++ b/browser/extensions/e10srollout/bootstrap.js
@@ -79,17 +79,18 @@ function defineCohort() {
);
} else {
Preferences.reset(PREF_E10S_ADDON_POLICY);
}
let userOptedOut = optedOut();
let userOptedIn = optedIn();
let disqualified = (Services.appinfo.multiprocessBlockPolicy != 0);
- let testGroup = (getUserSample() < TEST_THRESHOLD[updateChannel]);
+ let testThreshold = TEST_THRESHOLD[updateChannel];
+ let testGroup = (getUserSample() < testThreshold);
let hasNonExemptAddon = Preferences.get(PREF_E10S_HAS_NONEXEMPT_ADDON, false);
let temporaryDisqualification = getTemporaryDisqualification();
let temporaryQualification = getTemporaryQualification();
let cohortPrefix = "";
if (disqualified) {
cohortPrefix = "disqualified-";
} else if (hasNonExemptAddon) {
@@ -106,17 +107,21 @@ function defineCohort() {
// still be denied by the backend, which is useful so that the E10S_STATUS
// telemetry probe can be correctly set.
// For these volatile disqualification reasons, however, we must not try
// to activate e10s because the backend doesn't know about it. E10S_STATUS
// here will be accumulated as "2 - Disabled", which is fine too.
setCohort(`temp-disqualified-${temporaryDisqualification}`);
Preferences.reset(PREF_TOGGLE_E10S);
- } else if (!disqualified && temporaryQualification != "") {
+ } else if (!disqualified && testThreshold < 1.0 &&
+ temporaryQualification != "") {
+ // Users who are qualified for e10s and on channels where some population
+ // would not receive e10s can be pushed into e10s anyway via a temporary
+ // qualification which overrides the user sample value when non-empty.
setCohort(`temp-qualified-${temporaryQualification}`);
Preferences.set(PREF_TOGGLE_E10S, true);
} else if (testGroup) {
setCohort(`${cohortPrefix}test`);
Preferences.set(PREF_TOGGLE_E10S, true);
} else {
setCohort(`${cohortPrefix}control`);
Preferences.reset(PREF_TOGGLE_E10S);