Bug 1079573 - Fix for BrowserTabsRemoteAutostart prefEnabled boolean defined out of scope in non-nightly builds. r=mossop
authorJim Mathies <jmathies@mozilla.com>
Thu, 09 Oct 2014 12:33:35 -0500
changeset 232920 ecf7c54a9dce5c5a37e66b177d69c8b9eb688fad
parent 232804 cff6335a600972067f0fe41293b52003b0d1fa24
child 232921 3569e710513f661f0bac91d6a54d9b4b197e937f
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1079573
milestone35.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 1079573 - Fix for BrowserTabsRemoteAutostart prefEnabled boolean defined out of scope in non-nightly builds. r=mossop
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4572,26 +4572,28 @@ bool
 mozilla::BrowserTabsRemoteAutostart()
 {
   if (gBrowserTabsRemoteAutostartInitialized) {
     return gBrowserTabsRemoteAutostart;
   }
   gBrowserTabsRemoteAutostartInitialized = true;
   bool optInPref = Preferences::GetBool("browser.tabs.remote.autostart", false);
   bool trialPref = Preferences::GetBool("browser.tabs.remote.autostart.1", false);
+  bool prefEnabled = optInPref || trialPref;
 #if !defined(NIGHTLY_BUILD)
-  // When running tests with 'layers.offmainthreadcomposition.testing.enabled' and autostart
-  // set to true, return enabled.  These tests must be allowed to run remotely.
+  // When running tests with 'layers.offmainthreadcomposition.testing.enabled' and
+  // autostart set to true, return enabled.  These tests must be allowed to run
+  // remotely. Otherwise remote isn't allowed in non-nightly builds.
   bool testPref = Preferences::GetBool("layers.offmainthreadcomposition.testing.enabled", false);
   if (testPref && optInPref) {
     gBrowserTabsRemoteAutostart = true;
   }
 #else
-  bool prefEnabled = optInPref || trialPref;
-
+  // Nightly builds, update gBrowserTabsRemoteAutostart based on all the
+  // e10s remote relayed prefs we watch.
   bool disabledForA11y = Preferences::GetBool("browser.tabs.remote.autostart.disabled-because-using-a11y", false);
   // Only disable for IME for the automatic pref, not the opt-in one.
   bool disabledForIME = trialPref && KeyboardMayHaveIME();
 
   if (prefEnabled) {
     if (gSafeMode) {
       LogE10sBlockedReason("Firefox is in safe mode.");
     } else if (disabledForA11y) {