summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/bug1191756.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/gc/bug1191756.js')
-rw-r--r--js/src/jit-test/tests/gc/bug1191756.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/gc/bug1191756.js b/js/src/jit-test/tests/gc/bug1191756.js
new file mode 100644
index 0000000000..ebc82341e9
--- /dev/null
+++ b/js/src/jit-test/tests/gc/bug1191756.js
@@ -0,0 +1,18 @@
+// |jit-test| skip-if: typeof 'oomAtAllocation' === 'undefined'
+
+function fn(i) {
+ if (i == 3)
+ return ["isFinite"].map(function (i) {});
+ return [];
+}
+
+try {
+ fn(0);
+ fn(1);
+ fn(2);
+ oomAtAllocation(50);
+ fn(3);
+} catch(e) {
+ // Ignore oom
+}
+