summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/gc/oomInRegExp.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/gc/oomInRegExp.js')
-rw-r--r--js/src/jit-test/tests/gc/oomInRegExp.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/gc/oomInRegExp.js b/js/src/jit-test/tests/gc/oomInRegExp.js
new file mode 100644
index 000000000..a7f36b9d0
--- /dev/null
+++ b/js/src/jit-test/tests/gc/oomInRegExp.js
@@ -0,0 +1,6 @@
+if (!('oomTest' in this))
+ quit();
+
+oomTest(() => assertEq("foobar\xff5baz\u1200".search(/bar\u0178\d/i), 3));
+oomTest(() => assertEq((/(?!(?!(?!6)[\Wc]))/i).test(), false));
+oomTest(() => assertEq((/bar\u0178\d/i).exec("foobar\xff5baz\u1200") != null, true));