Bug 1078027: Move BrowserTabsRemoteAutostart()'s local-var 'testPref' inside the #ifdef where its only usage lives, to fix unused-variable warning. r=jimm
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 06 Oct 2014 09:25:12 -0700
changeset 208973 f5a23b027d12af93e8d787a2affac5a1f9e2ec00
parent 208972 0d22e31621232f51226cf2ea108c662002fc5d1c
child 208974 ef7d6554b13dabd115b9350a4fe3aefd3dc9f52d
push id50055
push userdholbert@mozilla.com
push dateMon, 06 Oct 2014 16:26:22 +0000
treeherdermozilla-inbound@f5a23b027d12 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1078027
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 1078027: Move BrowserTabsRemoteAutostart()'s local-var 'testPref' inside the #ifdef where its only usage lives, to fix unused-variable warning. r=jimm
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4572,20 +4572,20 @@ 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 testPref = Preferences::GetBool("layers.offmainthreadcomposition.testing.enabled", false);
 #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.
+  bool testPref = Preferences::GetBool("layers.offmainthreadcomposition.testing.enabled", false);
   if (testPref && optInPref) {
     gBrowserTabsRemoteAutostart = true;
   }
 #else
   bool prefEnabled = optInPref || trialPref;
 
   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.