mirror of
https://github.com/phpv8/v8js.git
synced 2025-01-18 15:01:54 +00:00
free v8::Persistent<v8::Script> on bailout
This commit is contained in:
parent
a520f49335
commit
8de27fd2ce
@ -554,8 +554,17 @@ static PHP_METHOD(V8Js, executeString)
|
||||
if (!res) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
v8js_execute_script(getThis(), res, flags, time_limit, memory_limit, &return_value TSRMLS_CC);
|
||||
v8js_script_free(res);
|
||||
|
||||
zend_try {
|
||||
v8js_execute_script(getThis(), res, flags, time_limit, memory_limit, &return_value TSRMLS_CC);
|
||||
v8js_script_free(res);
|
||||
}
|
||||
zend_catch {
|
||||
v8js_script_free(res);
|
||||
zend_bailout();
|
||||
}
|
||||
zend_end_try()
|
||||
|
||||
efree(res);
|
||||
}
|
||||
/* }}} */
|
||||
|
Loading…
Reference in New Issue
Block a user