blob: 324182cc78a0f5b6b3173f2645ff86c68f01587a [file] [log] [blame]
//@ slow!
//@ skip if $memoryLimited
//@ runDefault if !$memoryLimited
var longString = "x".repeat(2 ** 30);
var arr = Array(4).fill(longString);
var exception;
try {
JSON.stringify(arr);
} catch (e) {
exception = e;
}
if (exception != "RangeError: Out of memory")
throw "FAILED";