Bug 1068189 - Take into account 'layers.offmainthreadcomposition.testing.enabled' settings when disabling remote tabs. r=billm, a=sledru
authorJim Mathies <jmathies@mozilla.com>
Fri, 03 Oct 2014 09:45:07 -0500
changeset 216926 7b2887bd78a0
parent 216925 5217e39df54c
child 216927 f0253d7268bb
push id3971
push userjmathies@mozilla.com
push date2014-10-03 14:45 +0000
treeherdermozilla-beta@7b2887bd78a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm, sledru
bugs1068189
milestone33.0
Bug 1068189 - Take into account 'layers.offmainthreadcomposition.testing.enabled' settings when disabling remote tabs. r=billm, a=sledru
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -4433,23 +4433,29 @@ mozilla::BrowserTabsRemote()
   }
 
   return gBrowserTabsRemote;
 }
 
 bool
 mozilla::BrowserTabsRemoteAutostart()
 {
+  if (!gBrowserTabsRemoteAutostartInitialized) {
+    gBrowserTabsRemoteAutostartInitialized = true;
 #if !defined(NIGHTLY_BUILD)
-  return false;
-#endif
-  if (!gBrowserTabsRemoteAutostartInitialized) {
+    // When running tests with 'layers.offmainthreadcomposition.testing.enabled' and autostart
+    // set to true, return enabled.  These tests must be allowed to run remotely.
+    if (Preferences::GetBool("layers.offmainthreadcomposition.testing.enabled", false) &&
+        Preferences::GetBool("browser.tabs.remote.autostart", false)) {
+      gBrowserTabsRemoteAutostart = true;
+    }
+#else
     gBrowserTabsRemoteAutostart = !gSafeMode &&
                                   Preferences::GetBool("browser.tabs.remote.autostart", false);
-    gBrowserTabsRemoteAutostartInitialized = true;
+#endif
   }
 
   return gBrowserTabsRemoteAutostart;
 }
 
 void
 SetupErrorHandling(const char* progname)
 {