Debian Codegraph @

js/src/jit-test/tests/basic/spread-call-recursion.js

raw
1 let a = [];
2 a.length = 30;
3
4 function check(f) {
5 try {
6 f();
7 } catch (e) {
8 assertEq(e.message, "too much recursion");
9 }
10 }
11
12 let f = function() { return f(...a) + 1; };
13 let g = () => g(...a) + 1;
14 let h = function() { return new h(...a) + 1; };
15
16 check(f);
17 check(g);
18 check(h);