mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-03 16:51:52 +00:00
Merge remote-tracking branch 'rosmo/dispose-isolate'
This commit is contained in:
commit
133ad4a7b5
7
v8js.cc
7
v8js.cc
@ -647,6 +647,9 @@ static void php_v8js_free_storage(void *object TSRMLS_DC) /* {{{ */
|
|||||||
}
|
}
|
||||||
c->weak_closures.~map();
|
c->weak_closures.~map();
|
||||||
|
|
||||||
|
v8::Isolate *isolate = c->isolate;
|
||||||
|
isolate->Dispose();
|
||||||
|
|
||||||
if(c->tz != NULL) {
|
if(c->tz != NULL) {
|
||||||
free(c->tz);
|
free(c->tz);
|
||||||
}
|
}
|
||||||
@ -748,6 +751,10 @@ static int _php_v8js_create_ext_strarr(const char ***retval, int count, HashTabl
|
|||||||
|
|
||||||
static void php_v8js_fatal_error_handler(const char *location, const char *message) /* {{{ */
|
static void php_v8js_fatal_error_handler(const char *location, const char *message) /* {{{ */
|
||||||
{
|
{
|
||||||
|
v8::Isolate *isolate = v8::Isolate::GetCurrent();
|
||||||
|
if (isolate) {
|
||||||
|
isolate->Exit();
|
||||||
|
}
|
||||||
if (location) {
|
if (location) {
|
||||||
zend_error(E_ERROR, "%s %s", location, message);
|
zend_error(E_ERROR, "%s %s", location, message);
|
||||||
} else {
|
} else {
|
||||||
|
@ -195,6 +195,7 @@ static void php_v8js_call_php_func(zval *value, zend_class_entry *ce, zend_funct
|
|||||||
isolate->Enter();
|
isolate->Enter();
|
||||||
|
|
||||||
if (V8JSG(fatal_error_abort)) {
|
if (V8JSG(fatal_error_abort)) {
|
||||||
|
isolate->Exit();
|
||||||
v8::V8::TerminateExecution(isolate);
|
v8::V8::TerminateExecution(isolate);
|
||||||
info.GetReturnValue().Set(V8JS_NULL);
|
info.GetReturnValue().Set(V8JS_NULL);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user