1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
function f() { for (var i = 0x10F000; i <= 0x10FFFF + 1; ++i) { String.fromCodePoint(i); } } for (var i = 0; i < 2; ++i) { var err; try { f(); } catch (e) { err = e; } assertEq(err instanceof RangeError, true); }