summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBug672436.js
blob: 95a6d07a1d6809d0cffdadcbd0f33b4d7329894e (plain)
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);