Bug 1364863 - Make stylo property of reftests dependent on the pref, not just the define. r=heycam
authorBobby Holley <bobbyholley@gmail.com>
Mon, 15 May 2017 10:53:02 +0200
changeset 358587 acae4954e802bb34029bb6bb32a5cc4a8c32ee6d
parent 358586 53846835801718271933f107c24539959dd939f9
child 358588 eaffbb42ef8ec0cc6a647e2845be36ca00152dd6
push id31831
push userryanvm@gmail.com
push dateWed, 17 May 2017 00:10:01 +0000
treeherdermozilla-central@985b3ee93933 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1364863
milestone55.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 1364863 - Make stylo property of reftests dependent on the pref, not just the define. r=heycam
layout/tools/reftest/reftest.jsm
--- a/layout/tools/reftest/reftest.jsm
+++ b/layout/tools/reftest/reftest.jsm
@@ -617,16 +617,18 @@ function getStreamContent(inputStream)
 }
 
 // Build the sandbox for fails-if(), etc., condition evaluation.
 function BuildConditionSandbox(aURL) {
     var sandbox = new Components.utils.Sandbox(aURL.spec);
     var xr = CC[NS_XREAPPINFO_CONTRACTID].getService(CI.nsIXULRuntime);
     var appInfo = CC[NS_XREAPPINFO_CONTRACTID].getService(CI.nsIXULAppInfo);
     sandbox.isDebugBuild = gDebug.isDebugBuild;
+    var prefs = CC["@mozilla.org/preferences-service;1"].
+                getService(CI.nsIPrefBranch);
 
     // xr.XPCOMABI throws exception for configurations without full ABI
     // support (mobile builds on ARM)
     var XPCOMABI = "";
     try {
         XPCOMABI = xr.XPCOMABI;
     } catch(e) {}
 
@@ -707,20 +709,21 @@ function BuildConditionSandbox(aURL) {
 #endif
 
 #if MOZ_WEBRTC
     sandbox.webrtc = true;
 #else
     sandbox.webrtc = false;
 #endif
 
+sandbox.stylo =
 #ifdef MOZ_STYLO
-    sandbox.stylo = true;
+    prefs.getBoolPref("layout.css.servo.enabled", false);
 #else
-    sandbox.stylo = false;
+    false;
 #endif
 
 #ifdef RELEASE_OR_BETA
     sandbox.release_or_beta = true;
 #else
     sandbox.release_or_beta = false;
 #endif
 
@@ -741,18 +744,16 @@ function BuildConditionSandbox(aURL) {
 
     // see if we have the test plugin available,
     // and set a sandox prop accordingly
     sandbox.haveTestPlugin = !!getTestPlugin("Test Plug-in");
 
     // Set a flag on sandbox if the windows default theme is active
     sandbox.windowsDefaultTheme = gContainingWindow.matchMedia("(-moz-windows-default-theme)").matches;
 
-    var prefs = CC["@mozilla.org/preferences-service;1"].
-                getService(CI.nsIPrefBranch);
     try {
         sandbox.nativeThemePref = !prefs.getBoolPref("mozilla.widget.disable-native-theme");
     } catch (e) {
         sandbox.nativeThemePref = true;
     }
     sandbox.gpuProcessForceEnabled = prefs.getBoolPref("layers.gpu-process.force-enabled", false);
 
     sandbox.prefs = CU.cloneInto({