I would like to monitor the execution of the script in v8, interrupting it if the execution takes an excessive amount of time, e.g. as a result of an endless loop. If you are familiar, SpiderMonkey JS engine has JS_SetOperationCallback (JS_SetBranchCallback) API which can be adopted for that purpose.
>From what I learned about v8, the only way would be to run an instance of the v8 interpreter in a separate process, monitor it externally and terminate the process when I decide that the processing takes too much time. I hoped that SetCounterFunction and SetCreateHistogramFunction may help but apparently they do not cover the execution stage, or at least they do not produce anything if I am inside an endless loop which doesn't affect the garbage collection. Could be that I missed something? Is there a better way to monitor the time of the execution and interrupt it when necessary? Thanks, Martin --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
