1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
try { new Error() } catch (e) {} const N = 18; var arr = []; for (var i = 0; i < N; ++i) arr[i] = 'a'; arr[N] = '%'; function inner(i) { decodeURI(arr[i]); } function outer() { for (var i = 0; i <= N; ++i) inner(i); } var caught = false; try { outer(); } catch (e) { caught = true; } assertEq(caught, true);