js/src/tests/js1_8_5/extensions/recursion.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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  */
     9 //-----------------------------------------------------------------------------
    10 var BUGNUMBER = 622167;
    11 var summary = 'Handle infinite recursion';
    12 print(BUGNUMBER + ": " + summary);
    14 /**************
    15  * BEGIN TEST *
    16  **************/
    18 function eval() { eval(); }
    20 function DoWhile_3()
    21 {
    22   eval();
    23 }
    25 try
    26 {
    27   DoWhile_3();
    28 }
    29 catch(e) { }
    31 var r;
    32 function f()
    33 {
    34   r = arguments;
    35   test();
    36   yield 170;
    37 }
    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();
    54 /******************************************************************************/
    56 if (typeof reportCompare === "function")
    57   reportCompare(true, true);
    59 print("All tests passed!");

mercurial