summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/Set/bug1729269.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/Set/bug1729269.js')
-rw-r--r--js/src/jit-test/tests/Set/bug1729269.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/Set/bug1729269.js b/js/src/jit-test/tests/Set/bug1729269.js
new file mode 100644
index 0000000000..e97f6d2a12
--- /dev/null
+++ b/js/src/jit-test/tests/Set/bug1729269.js
@@ -0,0 +1,19 @@
+// |jit-test| skip-if: !('oomTest' in this)
+
+var patchSet = new Set();
+
+function checkSet(str) {
+ patchSet.has(str);
+}
+
+for (var i = 0; i < 20; i++) {
+ checkSet("s");
+}
+
+let re = /x(.*)x/;
+let count = 0;
+oomTest(() => {
+ // Create a string that needs to be atomized.
+ let result = re.exec("xa" + count++ + "ax")[1];
+ checkSet(result);
+})