Re: how to avoid infinite loop

2008-04-16 Thread jeeva . usa
Thanks a lot.. that did it... I should have known better that to use the term infinite "recursion" instead of "loop". Thanks. ___ dev-tech-js-engine-rhino mailing list dev-tech-js-engine-rhino@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech

RE: how to avoid infinite loop

2008-04-16 Thread Ruland Kevin-BHP637
call: Context.setMaximumInterpreterStackDepth() Kevin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, April 16, 2008 2:29 PM To: dev-tech-js-engine-rhino@lists.mozilla.org Subject: Re: how to avoid infinite loop I just added

Re: how to avoid infinite loop

2008-04-16 Thread jeeva . usa
I just added some debugging script to figure out how many times Firefox and IE execute the statements before they exit out of the infinite loop. IE displayed a message - "Stack overflow" and exited after 2555 invocations. FireFox - exited after 1000 invocations . I think the logic to detect infi

RE: how to avoid infinite loop

2008-04-14 Thread Ruland Kevin-BHP637
There are a couple of ways to do this: One way is to implement a ContextFactory class which sets the instruction threashold: ContextFactory.initGlobal( new ContextFactory() { protected Context makeContext() { Context cx = super.makeContext(); cx.setInstructionObserverThreshold( 100