The DevTools team need to log some telemetry about whether the current Firefox build is 32 or 64-bit.
I was told to use XPCOMABI but the possible results are x86, x86_64, ia_64, ppc, SPARC, Alpha or ARM. The problem is that early mac versions were 32-bit so assuming ppc is 64-bit is not accurate. Most cellphones that have an ARM processor are 32-bit but not all. There are similar issues with SPARC and Alpha. Does anybody know a reliable way to detect a 32 or 64-bit build? I am happy to extend XPCOMABI if that is what it takes. Here is the current unreliable code: + _getIs64Bits: function() { + let appInfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo); + + let processor = appInfo.XPCOMABI.split("-")[0]; + + switch (processor) { + case "x86": + return 0; // 32-bit + case "x86_64": + case "ia_64": + case "ppc": + return 1; // 64-bit + } + + return 2; // Unknown - SPARC, Alpha or ARM. + }, /Mike _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform