There is no way of getting callbacks from V8 when say a loop have been
running for some period of time. In order to take
advantage v8::V8::TerminateExecution() you will need to monitor the thread
running V8 to see whether it makes progress in some was which will be up to
the embedding application to define. This will typically mean that execution
leaves V8 at times and execute code in the embedding application. If no
progress is made v8::V8::TerminateExecution() can be called from a separate
thread.
Regards,
Søren

On Tue, Oct 13, 2009 at 13:34, komadm <[email protected]> wrote:

>
> Hi,
>
> For instance, let's assume that a script passed to my V8-based
> application includes following set of statements:
> ...
> var i = 1;
> while (i);
> ...
>
> This artificial sample will cause hanging of the execution thread.
>
> Is there some way to define something like 'branch - statement'
> callback function (like already methioned earlier SpiderMonkey's
> JS_SetBranchCallback) which may be used for terminating the thread via
> v8::V8::TerminateExecution() under specified conditions (like
> execution time etc)?
>
> Thanks in advance,
> --
> Dmitriy K.
> >
>

--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to