blob: e97f6d2a125ac55351484333bc53e164b4114d98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
})
|