Bug 1173182: Fix false positives in telemetry environment CPU extensions field; r=gfritzsche a=sledru
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -938,21 +938,19 @@ EnvironmentCache.prototype = {
const CPU_EXTENSIONS = ["hasMMX", "hasSSE", "hasSSE2", "hasSSE3", "hasSSSE3",
"hasSSE4A", "hasSSE4_1", "hasSSE4_2", "hasEDSP", "hasARMv6",
"hasARMv7", "hasNEON"];
// Enumerate the available CPU extensions.
let availableExts = [];
for (let ext of CPU_EXTENSIONS) {
- try {
- Services.sysinfo.getProperty(ext);
- // If it doesn't throw, add it to the list.
+ if (getSysinfoProperty(ext, false)) {
availableExts.push(ext);
- } catch (e) {}
+ }
}
cpuData.extensions = availableExts;
return cpuData;
},
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_ANDROID)