Bug 1447611: Remove references to stylo prefs from Troubleshoot.jsm. r=jwatt draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 21 Mar 2018 12:48:11 +0100
changeset 770682 f2c738a89ae7d9206803af1f51420d35c28a26d1
parent 770681 13bcc25f2659167c8a6be333bc9274a5b3382296
child 770683 1c7b2a0f7c1cbc05c76a411302b60b27fd79f296
push id103471
push userbmo:emilio@crisal.io
push dateWed, 21 Mar 2018 17:58:26 +0000
reviewersjwatt
bugs1447611
milestone61.0a1
Bug 1447611: Remove references to stylo prefs from Troubleshoot.jsm. r=jwatt MozReview-Commit-ID: 3tD2GRgE00o
toolkit/modules/Troubleshoot.jsm
toolkit/modules/tests/browser/browser_Troubleshoot.js
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -11,19 +11,16 @@ ChromeUtils.import("resource://gre/modul
 ChromeUtils.import("resource://gre/modules/AppConstants.jsm");
 
 var Experiments;
 try {
   Experiments = ChromeUtils.import("resource:///modules/experiments/Experiments.jsm").Experiments;
 } catch (e) {
 }
 
-const env = Cc["@mozilla.org/process/environment;1"]
-              .getService(Ci.nsIEnvironment);
-
 // We use a preferences whitelist to make sure we only show preferences that
 // are useful for support and won't compromise the user's privacy.  Note that
 // entries are *prefixes*: for example, "accessibility." applies to all prefs
 // under the "accessibility.*" branch.
 const PREFS_WHITELIST = [
   "accessibility.",
   "apz.",
   "browser.cache.",
@@ -62,17 +59,16 @@ const PREFS_WHITELIST = [
   "general.useragent.",
   "gfx.",
   "html5.",
   "image.",
   "javascript.",
   "keyword.",
   "layers.",
   "layout.css.dpi",
-  "layout.css.servo.",
   "layout.display-list.",
   "media.",
   "mousewheel.",
   "network.",
   "permissions.default.image",
   "places.",
   "plugin.",
   "plugins.",
@@ -219,43 +215,16 @@ var dataProviders = {
                          .createInstance(Ci.nsISupportsPRUint64);
       let appinfo = Services.appinfo.QueryInterface(Ci.nsIObserver);
       appinfo.observe(e10sStatus, "getE10SBlocked", "");
       data.autoStartStatus = e10sStatus.data;
     } catch (e) {
       data.autoStartStatus = -1;
     }
 
-    data.styloBuild = AppConstants.MOZ_STYLO;
-    data.styloDefault = Services.prefs.getDefaultBranch(null)
-                                .getBoolPref("layout.css.servo.enabled", false);
-    data.styloResult = false;
-    // Perhaps a bit redundant in places, but this is easier to compare with the
-    // the real check in `nsLayoutUtils.cpp` to ensure they test the same way.
-    if (AppConstants.MOZ_STYLO) {
-      if (env.get("STYLO_FORCE_ENABLED")) {
-        data.styloResult = true;
-      } else if (env.get("STYLO_FORCE_DISABLED")) {
-        data.styloResult = false;
-      } else {
-        data.styloResult =
-          Services.prefs.getBoolPref("layout.css.servo.enabled", false);
-      }
-    }
-    data.styloChromeDefault =
-      Services.prefs.getDefaultBranch(null)
-              .getBoolPref("layout.css.servo.chrome.enabled", false);
-    data.styloChromeResult = false;
-    if (data.styloResult) {
-      let winUtils = Services.wm.getMostRecentWindow("").
-                     QueryInterface(Ci.nsIInterfaceRequestor).
-                     getInterface(Ci.nsIDOMWindowUtils);
-      data.styloChromeResult = winUtils.isStyledByServo;
-    }
-
     if (Services.policies) {
       data.policiesStatus = Services.policies.status;
     }
 
     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();
--- a/toolkit/modules/tests/browser/browser_Troubleshoot.js
+++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js
@@ -139,31 +139,16 @@ const SNAPSHOT_SCHEMA = {
           type: "number",
         },
         currentContentProcesses: {
           type: "number",
         },
         maxContentProcesses: {
           type: "number",
         },
-        styloBuild: {
-          type: "boolean",
-        },
-        styloDefault: {
-          type: "boolean",
-        },
-        styloResult: {
-          type: "boolean",
-        },
-        styloChromeDefault: {
-          type: "boolean",
-        },
-        styloChromeResult: {
-          type: "boolean",
-        },
         policiesStatus: {
           type: "number",
         },
         keyGoogleFound: {
           type: "boolean",
         },
         keyMozillaFound: {
           type: "boolean",