blob: b300f4b838f2f1469519c89b94a88cd1000e3dcc [file] [log] [blame]
//@ skip if $memoryLimited
//@ runDefault if !$memoryLimited
// This test should not crash.
var error;
let str = '';
let arr = [{}, 2, 3];
try {
for (let z = 0; z < 30; z++)
str = arr.join(str); // exponentially grow length of string.
} catch(e) {
error = e;
}
if (!error)
throw Error("Failed");