0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 18:41:52 +00:00

Z_ADDREF_P on propagated previous exception

This commit is contained in:
Stefan Siegl 2015-09-25 07:36:20 +02:00
parent fb0270d8ec
commit 193c1c1013

View File

@ -92,6 +92,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8::
zend_class_entry *exception_ce = zend_exception_get_default(TSRMLS_C); zend_class_entry *exception_ce = zend_exception_get_default(TSRMLS_C);
if (Z_TYPE_P(php_exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(php_exception), exception_ce TSRMLS_CC)) { if (Z_TYPE_P(php_exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(php_exception), exception_ce TSRMLS_CC)) {
Z_ADDREF_P(php_exception);
zend_exception_set_previous(return_value, php_exception TSRMLS_CC); zend_exception_set_previous(return_value, php_exception TSRMLS_CC);
} }
} }