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.

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

mercurial