|
1 // |reftest| skip-if(xulRuntime.OS=="Darwin"&&isDebugBuild) -- this takes too long to over-recurse. |
|
2 /* |
|
3 * Any copyright is dedicated to the Public Domain. |
|
4 * http://creativecommons.org/licenses/publicdomain/ |
|
5 * Contributor: |
|
6 * Christian Holler <decoder@own-hero.net> |
|
7 */ |
|
8 |
|
9 //----------------------------------------------------------------------------- |
|
10 var BUGNUMBER = 622167; |
|
11 var summary = 'Handle infinite recursion'; |
|
12 print(BUGNUMBER + ": " + summary); |
|
13 |
|
14 /************** |
|
15 * BEGIN TEST * |
|
16 **************/ |
|
17 |
|
18 function eval() { eval(); } |
|
19 |
|
20 function DoWhile_3() |
|
21 { |
|
22 eval(); |
|
23 } |
|
24 |
|
25 try |
|
26 { |
|
27 DoWhile_3(); |
|
28 } |
|
29 catch(e) { } |
|
30 |
|
31 var r; |
|
32 function f() |
|
33 { |
|
34 r = arguments; |
|
35 test(); |
|
36 yield 170; |
|
37 } |
|
38 |
|
39 function test() |
|
40 { |
|
41 function foopy() |
|
42 { |
|
43 try |
|
44 { |
|
45 for (var i in f()); |
|
46 } |
|
47 catch (e) { } |
|
48 } |
|
49 foopy(); |
|
50 gc(); |
|
51 } |
|
52 test(); |
|
53 |
|
54 /******************************************************************************/ |
|
55 |
|
56 if (typeof reportCompare === "function") |
|
57 reportCompare(true, true); |
|
58 |
|
59 print("All tests passed!"); |