Bug 1401249 - Fix getStringPref usage in clicktoplay-rollout. r=Gijs
authorFelipe Gomes <felipc@gmail.com>
Tue, 19 Sep 2017 13:32:19 -0300
changeset 381659 d94508124715f39a2e3f7a13aae12a12bf311855
parent 381658 7d6ade2d75d99866e1c343f61fb42991b0be2b7f
child 381660 8a27ba2f85b4e95108d333d45bd452a4ec1bde9e
push id32535
push userkwierso@gmail.com
push dateTue, 19 Sep 2017 21:06:08 +0000
treeherdermozilla-central@c0d1f9eb2a40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1401249
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1401249 - Fix getStringPref usage in clicktoplay-rollout. r=Gijs getStringPref(.., undefined) actually returns null instead of undefined. MozReview-Commit-ID: H7aSQGnH8rK
browser/extensions/clicktoplay-rollout/bootstrap.js
--- a/browser/extensions/clicktoplay-rollout/bootstrap.js
+++ b/browser/extensions/clicktoplay-rollout/bootstrap.js
@@ -66,16 +66,18 @@ function defineCohort() {
         // intentionally missing from the list is STATE_ENABLED,
         // which will keep cohort undefined.
         break;
     }
   }
 
   switch (cohort) {
     case undefined:
+    case null:
+    case "":
     case "test":
     case "control":
     case "excluded":
     {
       // If it's either test/control, the cohort might have changed
       // if the desired sampling has been changed.
       let testThreshold = TEST_THRESHOLD[updateChannel];
       let userSample = getUserSample();