24836953 firefox/thunderbird js test failures s11u3-sru
authorPetr Sumbera <petr.sumbera@oracle.com>
Wed, 16 Nov 2016 07:28:08 -0800
branchs11u3-sru
changeset 7365 46cabb29da49
parent 7364 1ac24a377555
child 7394 32bff55e18d0
24836953 firefox/thunderbird js test failures
components/desktop/firefox/patches/firefox-54-js-tests.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox-54-js-tests.patch	Wed Nov 16 07:28:08 2016 -0800
@@ -0,0 +1,150 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=1308455
+https://bugzilla.mozilla.org/show_bug.cgi?id=1308897
+https://bugzilla.mozilla.org/show_bug.cgi?id=1309157
+https://bugzilla.mozilla.org/show_bug.cgi?id=1309246
+https://bugzilla.mozilla.org/show_bug.cgi?id=1233863
+
+--- a/js/src/jit-test/tests/asm.js/testHeapAccess.js
++++ b/js/src/jit-test/tests/asm.js/testHeapAccess.js
[email protected]@ -18,8 +18,20 @@
+ 
+ setCachingEnabled(true);
+ 
++// In order to allow following tests work on both big-endian and little-
++// endian architectures we need to define least significant byte (lsb) and
++// least significant word (lsw).
+ var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[0]|0}; return f');
+ var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN));
++var lsb=0;
++var lsw=0
++if (f(0x12345678) == 0x12) {
++  lsb=3;
++  lsw=1;
++}
++
++var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[' + lsb + ']|0}; return f');
++var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN));
+ assertEq(f(0),0);
+ assertEq(f(0x7f),0x7f);
+ assertEq(f(0xff),-1);
[email protected]@ -33,7 +45,7 @@
+         setJitCompilerOption("signals.enable", 0);
+ 
+         var buf = new ArrayBuffer(BUF_MIN);
+-        var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + '/* not a clone */ function f(i) {i=i|0; i32[0] = i; return i8[0]|0}; return f');
++        var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + '/* not a clone */ function f(i) {i=i|0; i32[0] = i; return i8[' + lsb + ']|0}; return f');
+         var f = asmLink(code, this, null, buf);
+         assertEq(f(0),0);
+         assertEq(f(0x7f),0x7f);
[email protected]@ -52,21 +64,21 @@
+ 
+ setCachingEnabled(false);
+ 
+-var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[0]|0}; return f');
++var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[' + lsb + ']|0}; return f');
+ var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN));
+ assertEq(f(0),0);
+ assertEq(f(0x7f),0x7f);
+ assertEq(f(0xff),0xff);
+ assertEq(f(0x100),0);
+ 
+-var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i16[0]|0}; return f');
++var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i16[' + lsw + ']|0}; return f');
+ var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN));
+ assertEq(f(0),0);
+ assertEq(f(0x7fff),0x7fff);
+ assertEq(f(0xffff),-1);
+ assertEq(f(0x10000),0);
+ 
+-var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u16[0]|0}; return f');
++var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u16[' + lsw + ']|0}; return f');
+ var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN));
+ assertEq(f(0),0);
+ assertEq(f(0x7fff),0x7fff);
[email protected]@ -87,14 +99,14 @@
+ assertEq(f(0xffffffff),-1);
+ assertEq(f(0x100000000),0);
+ 
+-var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[0]|0}; return f');
++var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return i8[' + lsb + ']|0}; return f');
+ var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN));
+ assertEq(f(0),0);
+ assertEq(f(0x7f),0x7f);
+ assertEq(f(0xff),-1);
+ assertEq(f(0x100),0);
+ 
+-var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[0]|0}; return f');
++var code = asmCompile('glob', 'imp', 'b', USE_ASM + HEAP_IMPORTS + 'function f(i) {i=i|0; i32[0] = i; return u8[' + lsb + ']|0}; return f');
+ var f = asmLink(code, this, null, new ArrayBuffer(BUF_MIN));
+ assertEq(f(0),0);
+ assertEq(f(0x7f),0x7f);
+--- a/js/src/vm/CodeCoverage.cpp
++++ b/js/src/vm/CodeCoverage.cpp
[email protected]@ -222,13 +222,13 @@
+             uint64_t taken = hits - fallthroughHits;
+             outBRDA_.printf("BRDA:%d,%d,0,", lineno, branchId);
+             if (taken)
+-                outBRDA_.printf("%d\n", taken);
++                outBRDA_.printf("%" PRIu64 "\n", taken);
+             else
+                 outBRDA_.put("-\n", 2);
+ 
+             outBRDA_.printf("BRDA:%d,%d,1,", lineno, branchId);
+             if (fallthroughHits)
+-                outBRDA_.printf("%d\n", fallthroughHits);
++                outBRDA_.printf("%" PRIu64 "\n", fallthroughHits);
+             else
+                 outBRDA_.put("-\n", 2);
+ 
[email protected]@ -301,7 +301,7 @@
+ 
+                     outBRDA_.printf("BRDA:%d,%d,%d,", lineno, branchId, i);
+                     if (caseHits)
+-                        outBRDA_.printf("%d\n", caseHits);
++                        outBRDA_.printf("%" PRIu64 "\n", caseHits);
+                     else
+                         outBRDA_.put("-\n", 2);
+ 
[email protected]@ -327,7 +327,7 @@
+ 
+             outBRDA_.printf("BRDA:%d,%d,%d,", lineno, branchId, numCases);
+             if (defaultHits)
+-                outBRDA_.printf("%d\n", defaultHits);
++                outBRDA_.printf("%" PRIu64 "\n", defaultHits);
+             else
+                 outBRDA_.put("-\n", 2);
+             numBranchesFound_++;
+--- a/js/src/jit-test/tests/ctypes/conversion-native-function.js
++++ b/js/src/jit-test/tests/ctypes/conversion-native-function.js
[email protected]@ -6,7 +6,7 @@
+ function test() {
+   let lib;
+   try {
+-    lib = ctypes.open(ctypes.libraryName("c"));
++    lib = ctypes.open(ctypes.libraryName("m"));
+   } catch (e) {
+   }
+   if (!lib)
+--- a/js/src/jit-test/tests/ion/bug909997.js
++++ b/js/src/jit-test/tests/ion/bug909997.js
[email protected]@ -1,3 +1,10 @@
++// getJitCompilerOptions will always return array with zeros when JIT is
++// disabled. Therefore we quit now.
++if (inJit() == 'Baseline is disabled.') {
++    print("JIT is disabled.");
++    quit();
++}
++
+ var wait = 100;
+ 
+ var method_A = function() {
+--- a/js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-02.js
++++ b/js/src/jit-test/tests/debug/Debugger-allowUnobservedAsmJS-02.js
[email protected]@ -19,5 +19,7 @@
+ 
+ var msg = getLastWarning().message;
+ assertEq(msg === "asm.js type error: Disabled by debugger" ||
++         msg === "asm.js type error: Disabled by lack of a JIT compiler" ||
++         msg === "asm.js type error: Disabled by javascript.options.asmjs in about:config" ||
+          msg === "asm.js type error: Disabled by lack of floating point support",
+          true);