]>
Commit | Line | Data |
---|---|---|
81345200 A |
1 | var count = 0; |
2 | ||
3 | function bar(f) { | |
4 | if (++count >= 10000) | |
5 | throw f; | |
6 | } | |
7 | ||
8 | noInline(bar); | |
9 | ||
10 | function foo(a) { | |
11 | var x = a + 1; | |
12 | for (;;) { | |
13 | bar(function() { return x; }); | |
14 | } | |
15 | } | |
16 | ||
17 | noInline(foo); | |
18 | ||
19 | try { | |
20 | foo(42); | |
21 | } catch (f) { | |
22 | var result = f(); | |
23 | if (result != 43) | |
24 | throw "Error: bad result: " + result; | |
25 | } | |
26 |