On 2009.02.19., at 7:49, David Parks wrote:

Can you not add the stop flag check to the observeInstructionCount callback method? That would be the most straight forward way to stop the script and really take very few lines of code to implement. Can you explain why this wouldn't work in your case? If you're concerned with finding a reference to the stop check flag you can always extend Context and add your own reference
to whatever object contains the check you need to perform as nearly
demonstrated in this example:

http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/ContextFactory.h
tml

Hm... I'm thinking I might update that example a bit - throw a java.lang.ThreadDeath specifically in place of generic java.lang. Error.

Attila.

David

_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to