Bug 1397379 - getStringPref in clicktoplay-rollout addon throws for new profiles. r=mcastelluccio
MozReview-Commit-ID: GN0Cgl3jqK5
--- a/browser/extensions/clicktoplay-rollout/bootstrap.js
+++ b/browser/extensions/clicktoplay-rollout/bootstrap.js
@@ -41,17 +41,17 @@ function startup() {
}
function defineCohort() {
let updateChannel = UpdateUtils.getUpdateChannel(false);
if (!(updateChannel in TEST_THRESHOLD)) {
return;
}
- let cohort = Services.prefs.getStringPref(PREF_COHORT_NAME);
+ let cohort = Services.prefs.getStringPref(PREF_COHORT_NAME, undefined);
if (!cohort) {
// The cohort has not been defined yet: this is the first
// time that we're running. Let's see if the user has
// a non-default setting to avoid changing it.
let currentPluginState = Services.prefs.getIntPref(PREF_FLASH_STATE);
switch (currentPluginState) {
case Ci.nsIPluginTag.STATE_CLICKTOPLAY: