| //@ requireOptions("--jitPolicyScale=0", "--useConcurrentJIT=0") |
| // This tests that when a switch(String) converts the String argument, it properly handles OOM |
| function test(createOOMString) |
| var str = String.fromCharCode(365); |
| str = str.padEnd(2147483644, '123'); |
| throw "Case \"one\", dhouldn't get here"; |
| throw "Case \"two\", shouldn't get here"; |
| throw "Case \"three\", shouldn't get here"; |
| throw "Default case, shouldn't get here"; |
| function testLowerTiers() |
| for (let i = 0; i < 200; i++) { |
| if (e != "Error: Out of memory") |
| throw "Unexpecte error: \"" + e + "\""; |
| for (let i = 0; i < 1000; i++) { |
| if (e != "Error: Out of memory") |
| throw "Unexpecte error: \"" + e + "\""; |