mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-03 14:31:53 +00:00
Don't terminate execution repeatedly
This commit is contained in:
parent
790735f04a
commit
5f6d9aee2d
@ -202,6 +202,13 @@ void v8js_v8_call(v8js_ctx *c, zval **return_value,
|
|||||||
|
|
||||||
void v8js_terminate_execution(v8::Isolate *isolate) /* {{{ */
|
void v8js_terminate_execution(v8::Isolate *isolate) /* {{{ */
|
||||||
{
|
{
|
||||||
|
if(v8::V8::IsExecutionTerminating(isolate)) {
|
||||||
|
/* Execution already terminating, needn't trigger it again and
|
||||||
|
* especially must not execute the spinning loop (which would cause
|
||||||
|
* crashes in V8 itself, at least with 4.2 and 4.3 version lines). */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Unfortunately just calling TerminateExecution on the isolate is not
|
/* Unfortunately just calling TerminateExecution on the isolate is not
|
||||||
* enough, since v8 just marks the thread as "to be aborted" and doesn't
|
* enough, since v8 just marks the thread as "to be aborted" and doesn't
|
||||||
* immediately do so. Hence we enter an endless loop after signalling
|
* immediately do so. Hence we enter an endless loop after signalling
|
||||||
|
Loading…
Reference in New Issue
Block a user