diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/regexp/bug1640479.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/regexp/bug1640479.js b/js/src/jit-test/tests/regexp/bug1640479.js new file mode 100644 index 0000000000..ff166d6451 --- /dev/null +++ b/js/src/jit-test/tests/regexp/bug1640479.js @@ -0,0 +1,15 @@ +// |jit-test| skip-if: !('oomTest' in this) + +var failures = 0; +var i = 0; + +function foo() { + var e; + var r = RegExp("(?<_" + (i++) + "a>)"); + try { e = r.exec("a"); } catch {} + e = r.exec("a"); + if (e.groups === undefined) failures++; +} + +oomTest(foo); +assertEq(failures, 0); |