michael@0: // |reftest| skip-if(xulRuntime.OS=="Darwin"&&isDebugBuild) -- this takes too long to over-recurse. michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: * Contributor: michael@0: * Christian Holler michael@0: */ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 622167; michael@0: var summary = 'Handle infinite recursion'; michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: function eval() { eval(); } michael@0: michael@0: function DoWhile_3() michael@0: { michael@0: eval(); michael@0: } michael@0: michael@0: try michael@0: { michael@0: DoWhile_3(); michael@0: } michael@0: catch(e) { } michael@0: michael@0: var r; michael@0: function f() michael@0: { michael@0: r = arguments; michael@0: test(); michael@0: yield 170; michael@0: } michael@0: michael@0: function test() michael@0: { michael@0: function foopy() michael@0: { michael@0: try michael@0: { michael@0: for (var i in f()); michael@0: } michael@0: catch (e) { } michael@0: } michael@0: foopy(); michael@0: gc(); michael@0: } michael@0: test(); michael@0: michael@0: /******************************************************************************/ michael@0: michael@0: if (typeof reportCompare === "function") michael@0: reportCompare(true, true); michael@0: michael@0: print("All tests passed!");