Skip to content

Commit 193c1c1

Browse files
committed
Z_ADDREF_P on propagated previous exception
1 parent fb0270d commit 193c1c1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

v8js_exceptions.cc

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ void v8js_create_script_exception(zval *return_value, v8::Isolate *isolate, v8::
9292

9393
zend_class_entry *exception_ce = zend_exception_get_default(TSRMLS_C);
9494
if (Z_TYPE_P(php_exception) == IS_OBJECT && instanceof_function(Z_OBJCE_P(php_exception), exception_ce TSRMLS_CC)) {
95+
Z_ADDREF_P(php_exception);
9596
zend_exception_set_previous(return_value, php_exception TSRMLS_CC);
9697
}
9798
}

0 commit comments

Comments
 (0)