blob: 4b20e03f89e78c36b3d719a88412fc92210fa13c [file] [log] [blame]
//@ skip if $memoryLimited
function foo(str, count) {
while (str.length < count) {
try {
str += str;
} catch (e) {}
}
return str.substring();
}
var x = foo("1", 1 << 20);
var y = foo("$1", 1 << 16);
var exception;
try {
var __v_6623 = x.replace(/(.+)/g, y);
} catch (e) {
exception = e;
}
if (exception != "RangeError: Out of memory")
throw "FAILED";