Bug 1382090 - Test both prefs and build for Stylo in about:support. r=bholley
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 19 Jul 2017 16:32:40 -0500
changeset 418499 2f1adcc174ad91375b40dc39815fd1f8b9c4e213
parent 418498 d94de30b99a355df91863e8ff6ff2699ca0ecffe
child 418500 ce836965fd58ca3e59fa52123b1422ecfde51fc3
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1382090
milestone56.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 1382090 - Test both prefs and build for Stylo in about:support. r=bholley Avoid the confusing state of "Stylo: true (disabled by build)" by also checking the build constant _and_ the pref / env var together. MozReview-Commit-ID: jTK66cWcyv
toolkit/modules/Troubleshoot.jsm
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -232,18 +232,19 @@ var dataProviders = {
     } catch (e) {
       data.autoStartStatus = -1;
     }
 
     data.styloBuild = AppConstants.MOZ_STYLO;
     data.styloDefault = Services.prefs.getDefaultBranch(null)
                                 .getBoolPref("layout.css.servo.enabled", false);
     data.styloResult =
-      !!env.get("STYLO_FORCE_ENABLED") ||
-      Services.prefs.getBoolPref("layout.css.servo.enabled", false);
+      AppConstants.MOZ_STYLO &&
+      (!!env.get("STYLO_FORCE_ENABLED") ||
+       Services.prefs.getBoolPref("layout.css.servo.enabled", false));
 
     const keyGoogle = Services.urlFormatter.formatURL("%GOOGLE_API_KEY%").trim();
     data.keyGoogleFound = keyGoogle != "no-google-api-key" && keyGoogle.length > 0;
 
     const keyMozilla = Services.urlFormatter.formatURL("%MOZILLA_API_KEY%").trim();
     data.keyMozillaFound = keyMozilla != "no-mozilla-api-key" && keyMozilla.length > 0;
 
     done(data);