Sfoglia il codice sorgente

Z_ADDREF_P on propagated previous exception

Stefan Siegl 9 anni fa
parent
commit
193c1c1013
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      v8js_exceptions.cc

+ 1 - 0
v8js_exceptions.cc

@@ -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);
 				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);
 				}
 			}