diff -r 000000000000 -r 6474c204b198 js/src/tests/js1_8_5/extensions/recursion.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/tests/js1_8_5/extensions/recursion.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,59 @@ +// |reftest| skip-if(xulRuntime.OS=="Darwin"&&isDebugBuild) -- this takes too long to over-recurse. +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + * Contributor: + * Christian Holler + */ + +//----------------------------------------------------------------------------- +var BUGNUMBER = 622167; +var summary = 'Handle infinite recursion'; +print(BUGNUMBER + ": " + summary); + +/************** + * BEGIN TEST * + **************/ + +function eval() { eval(); } + +function DoWhile_3() +{ + eval(); +} + +try +{ + DoWhile_3(); +} +catch(e) { } + +var r; +function f() +{ + r = arguments; + test(); + yield 170; +} + +function test() +{ + function foopy() + { + try + { + for (var i in f()); + } + catch (e) { } + } + foopy(); + gc(); +} +test(); + +/******************************************************************************/ + +if (typeof reportCompare === "function") + reportCompare(true, true); + +print("All tests passed!");