diff options
Diffstat (limited to 'js/src/jit-test/tests/xdr/bug1790615.js')
-rw-r--r-- | js/src/jit-test/tests/xdr/bug1790615.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/xdr/bug1790615.js b/js/src/jit-test/tests/xdr/bug1790615.js new file mode 100644 index 0000000000..39a914345a --- /dev/null +++ b/js/src/jit-test/tests/xdr/bug1790615.js @@ -0,0 +1,19 @@ +// |jit-test| --fuzzing-safe; --cpu-count=2; --ion-offthread-compile=off; skip-if: !isAsmJSCompilationAvailable() + +load(libdir + "asserts.js"); + +function asmCompile() { + var f = Function.apply(null, arguments); + return f; +} +var code = asmCompile('glob', 'imp', 'b', ` +"use asm"; +function f(i,j) { + i=i|0; + j=j|0; +} +return f +`); +let g80 = newGlobal({newCompartment: true}); +// Compiling to a Stencil XDR should fail because XDR encoding does not support asm.js +assertThrowsInstanceOf(() => g80.compileToStencilXDR(code, {}), g80.Error);
\ No newline at end of file |