Bug 1402376 - client code - Add whether the client has an incompatible version of JAWS to the update url. r=jimm, a=sledru
authorRobert Strong <robert.bugzilla@gmail.com>
Fri, 22 Sep 2017 12:43:36 -0700
changeset 424167 f73d23c1ac26bfa30b6667edb404538036689465
parent 424166 f2dc7e32e4ea47b4014b93aab6b1e1d76d1e9e7c
child 424168 f8e1f3cada56908735f98bbdbb319a04dd71cebb
push id1540
push userryanvm@gmail.com
push dateFri, 22 Sep 2017 20:01:34 +0000
treeherdermozilla-release@f8e1f3cada56 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, sledru
bugs1402376
milestone56.0
Bug 1402376 - client code - Add whether the client has an incompatible version of JAWS to the update url. r=jimm, a=sledru
toolkit/modules/UpdateUtils.jsm
--- a/toolkit/modules/UpdateUtils.jsm
+++ b/toolkit/modules/UpdateUtils.jsm
@@ -130,17 +130,30 @@ this.UpdateUtils = {
 };
 
 /* Get the distribution pref values, from defaults only */
 function getDistributionPrefValue(aPrefName) {
   return Services.prefs.getDefaultBranch(null).getCharPref(aPrefName, "default");
 }
 
 function getSystemCapabilities() {
-  return "ISET:" + gInstructionSet + ",MEM:" + getMemoryMB();
+  return "ISET:" + gInstructionSet + ",MEM:" + getMemoryMB() + getJAWS();
+}
+
+/**
+ * Gets the appropriate update url string for whether a JAWS screen reader that
+ * is incompatible with e10s is present on Windows. For platforms other than
+ * Windows this returns an empty string which is easier for balrog to detect.
+ */
+function getJAWS() {
+  if (AppConstants.platform != "win") {
+    return "";
+  }
+
+  return ",JAWS:" + (Services.appinfo.shouldBlockIncompatJaws ? "1" : "0");
 }
 
 /**
  * Gets the RAM size in megabytes. This will round the value because sysinfo
  * doesn't always provide RAM in multiples of 1024.
  */
 function getMemoryMB() {
   let memoryMB = "unknown";