On Sat, Nov 19, 2016 at 10:11 PM, James Lovejoy <jameslovej...@gmail.com> wrote:
> Hi,
>
> Is there a way to set a hard execution limit in the V8 engine? I want to be
> able to prevent things like infinite loops and recursions. I realise that
> since V8 compiles to machine code I don't get a program counter or anything.
> I feel like setting the "stack limit" is the right way to go but the usage
> of this feature from the documentation is unclear. Can someone guide me as
> to how to achieve such a limit?
>
> James

If 'execution limit' means 'time limit': start a watchdog thread and
call v8::Isolate::TerminateExecution() from that thread on timeout.
It must be a thread, it's not safe to call from a signal handler.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to