mirror of
https://github.com/phpv8/v8js.git
synced 2024-12-22 12:51:52 +00:00
* Propagate exception when zend_read_property reads __get and throws an exception
This commit is contained in:
parent
293a201d64
commit
cfa5e722fb
@ -765,10 +765,12 @@ v8::Local<v8::Value> v8js_named_property_callback(v8::Local<v8::Name> property_n
|
|||||||
(property_info != ZEND_WRONG_PROPERTY_INFO &&
|
(property_info != ZEND_WRONG_PROPERTY_INFO &&
|
||||||
property_info->flags & ZEND_ACC_PUBLIC)) {
|
property_info->flags & ZEND_ACC_PUBLIC)) {
|
||||||
zval *property_val = zend_read_property(NULL, &zobject, name, name_len, true, &php_value);
|
zval *property_val = zend_read_property(NULL, &zobject, name, name_len, true, &php_value);
|
||||||
|
if(EG(exception)) {
|
||||||
|
ret_value = v8js_propagate_exception(ctx);
|
||||||
|
} else if (property_val == &EG(uninitialized_zval)) {
|
||||||
// special case uninitialized_zval_ptr and return an empty value
|
// special case uninitialized_zval_ptr and return an empty value
|
||||||
// (indicating that we don't intercept this property) if the
|
// (indicating that we don't intercept this property) if the
|
||||||
// property doesn't exist.
|
// property doesn't exist.
|
||||||
if (property_val == &EG(uninitialized_zval)) {
|
|
||||||
ret_value = v8::Local<v8::Value>();
|
ret_value = v8::Local<v8::Value>();
|
||||||
} else {
|
} else {
|
||||||
// wrap it
|
// wrap it
|
||||||
|
Loading…
Reference in New Issue
Block a user