Bug 1382711 - Don't respect a stale pref on Nightly. r=Felipe draft
authorBlake Kaplan <mrbkap@gmail.com>
Thu, 20 Jul 2017 09:22:17 -0700
changeset 612311 cf0c654fe81251e5471fec94db61de7a95766b9c
parent 604915 e23f55311ecb5e0cd14c5010d1b40663b3a2e7d0
child 638383 7bfd124055b9a8bb13e82f3c8d1e7a1ef1aa140c
push id69469
push userbmo:mrbkap@mozilla.com
push dateThu, 20 Jul 2017 16:28:03 +0000
reviewersFelipe
bugs1382711
milestone56.0a1
Bug 1382711 - Don't respect a stale pref on Nightly. r=Felipe This pref is only set and maintained on Release and Beta (via the e10srollout addon). Respecting it on Beta might cause us to read stale values. MozReview-Commit-ID: ZDFdM41hw4
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -5162,20 +5162,26 @@ GetMaxWebProcessCount()
 
   // If the user has set dom.ipc.processCount, respect their decision
   // regardless of add-ons that might affect their experience or experiment
   // cohort.
   if (Preferences::HasUserValue(optInPref)) {
     return std::max(1u, optInPrefValue);
   }
 
+#ifdef RELEASE_OR_BETA
+  // For our rollout on Release and Beta, we set this pref from the
+  // e10srollout extension. On Nightly, we don't touch the pref at all,
+  // allowing stale values to disable e10s-multi for certain users.
   if (Preferences::HasUserValue("dom.ipc.processCount.web")) {
     // The user didn't opt in or out so read the .web version of the pref.
     return std::max(1, Preferences::GetInt("dom.ipc.processCount.web", 1));
   }
+#endif
+
   return optInPrefValue;
 }
 
 const char*
 PlatformBuildID()
 {
   return gToolkitBuildID;
 }