PageRenderTime 26ms CodeModel.GetById 17ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/js/src/jit-test/tests/basic/testBug672436.js

http://github.com/zpao/v8monkey
JavaScript | 25 lines | 20 code | 5 blank | 0 comment | 2 complexity | f43534ad0e297bac5deaad21393d0373 MD5 | raw file
 1try { new Error() } catch (e) {}
 2
 3const N = 18;
 4
 5var arr = [];
 6for (var i = 0; i < N; ++i)
 7    arr[i] = 'a';
 8arr[N] = '%';
 9
10function inner(i) {
11    decodeURI(arr[i]);
12}
13function outer() {
14    for (var i = 0; i <= N; ++i)
15        inner(i);
16}
17
18var caught = false;
19try {
20    outer();
21} catch (e) {
22    caught = true;
23}
24assertEq(caught, true);
25