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
--- 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);