image/test/reftest/pngsuite-ancillary/qcms-asm-check.js

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 // This is a workaround for bug 465088, that the qcms assembly doesn't
michael@0 2 // quite match the non-assembly output.
michael@0 3
michael@0 4 function check_qcms_has_assembly()
michael@0 5 {
michael@0 6 // We have assembly code on x86 and x86_64 architectures.
michael@0 7 // Unfortunately, detecting that is a little complicated.
michael@0 8
michael@0 9 if (navigator.platform == "MacIntel") {
michael@0 10 return true;
michael@0 11 }
michael@0 12
michael@0 13 if (navigator.platform.indexOf("Win") == 0 || navigator.platform == "OS/2") {
michael@0 14 // Assume all Windows and OS/2 is x86 or x86_64. We don't
michael@0 15 // expose any way for Web content to check.
michael@0 16 return true;
michael@0 17 }
michael@0 18
michael@0 19 // On most Unix-like platforms, navigator.platform is basically
michael@0 20 // |uname -sm|.
michael@0 21 if (navigator.platform.match(/(i[3456]86|x86_64|amd64|i86)/)) {
michael@0 22 return true;
michael@0 23 }
michael@0 24
michael@0 25 return false;
michael@0 26 }
michael@0 27
michael@0 28 var qcms_has_assembly = check_qcms_has_assembly();

mercurial