Hi,

I've been trying to come up with a way to terminate the V8 execution
on a script if it runs too long.

For this, I've used the Locker::StartPreemption() and on receiving a
preemption (in RuntimePreempt() method in execution.cc), am
incrementing a count and invoking
V8::TerminateExecution(current_thread_id) if the count exceeds a
limit.

However, the use of V8::TerminateExecution(current_thread_id) at that
point is causing a crash probably due to a stack corruption. I was
wondering if this isn't an appropriate place to use this API, and if
this API is supposed to be invoked in a specific way.

Please let me know if there is a proper way to use the
V8::TerminateExecution() API.

Thanks,
Ravi

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

Reply via email to