Bug 1277359 - Report SSE2 instruction support on linux update pings. r=rstrong draft
authorRalph Giles <giles@mozilla.com>
Fri, 07 Oct 2016 16:25:42 -0700
changeset 428278 e6ccfb2434473a88eca7447bd15d44763ae0aa8e
parent 428277 7fa1990f147dbe427146bcd47fc0a6bafa12afa8
child 534693 2269764e28efc8f8abab9bbbb4db16d578f190c1
push id33266
push userbmo:giles@thaumas.net
push dateFri, 21 Oct 2016 23:02:44 +0000
reviewersrstrong
bugs1277359
milestone52.0a1
Bug 1277359 - Report SSE2 instruction support on linux update pings. r=rstrong We need to advertise this to the update server to avoid downloading updates which won't run because of unsupported cpu features on the recipient's hardware. MozReview-Commit-ID: H36VXnD3TnW
toolkit/modules/UpdateUtils.jsm
--- a/toolkit/modules/UpdateUtils.jsm
+++ b/toolkit/modules/UpdateUtils.jsm
@@ -182,16 +182,24 @@ XPCOMUtils.defineLazyGetter(this, "gSyst
       Cu.reportError("Error getting processor instruction set. " +
                      "Exception: " + e);
     }
 
     lib.close();
     return instructionSet;
   }
 
+  if (AppConstants == "linux") {
+    let instructionSet = "unknown";
+    if navigator.cpuHasSSE2 {
+      instructionSet = "SSE2";
+    }
+    return instructionSet;
+  }
+
   return "NA"
 });
 
 /* Windows only getter that returns the processor architecture. */
 XPCOMUtils.defineLazyGetter(this, "gWinCPUArch", function aus_gWinCPUArch() {
   // Get processor architecture
   let arch = "unknown";