summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/oomInParseAsmJS.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/gc/oomInParseAsmJS.js')
-rw-r--r--js/src/jit-test/tests/gc/oomInParseAsmJS.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/gc/oomInParseAsmJS.js b/js/src/jit-test/tests/gc/oomInParseAsmJS.js
new file mode 100644
index 000000000..b5279a26a
--- /dev/null
+++ b/js/src/jit-test/tests/gc/oomInParseAsmJS.js
@@ -0,0 +1,17 @@
+if (!('oomTest' in this))
+ quit();
+
+function parseAsmJS() {
+ eval(`function m(stdlib)
+ {
+ "use asm";
+ var abs = stdlib.Math.abs;
+ function f(d)
+ {
+ d = +d;
+ return (~~(5.0 - +abs(d)))|0;
+ }
+ return f;
+ }`);
+}
+oomTest(parseAsmJS);