mirror of
https://github.com/bellard/quickjs.git
synced 2025-05-11 10:54:20 +08:00
fixed Proxy getOwnPropertyDescriptor with getters and setters
This commit is contained in:
parent
82d86b11d2
commit
b67c41689e
@ -46327,6 +46327,14 @@ static int js_proxy_get_own_property(JSContext *ctx, JSPropertyDescriptor *pdesc
|
||||
if (res < 0)
|
||||
return -1;
|
||||
|
||||
/* convert the result_desc.flags to property flags */
|
||||
if (result_desc.flags & (JS_PROP_HAS_GET | JS_PROP_HAS_SET)) {
|
||||
result_desc.flags |= JS_PROP_GETSET;
|
||||
} else {
|
||||
result_desc.flags |= JS_PROP_NORMAL;
|
||||
}
|
||||
result_desc.flags &= (JS_PROP_C_W_E | JS_PROP_TMASK);
|
||||
|
||||
if (target_desc_ret) {
|
||||
/* convert result_desc.flags to defineProperty flags */
|
||||
flags1 = result_desc.flags | JS_PROP_HAS_CONFIGURABLE | JS_PROP_HAS_ENUMERABLE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user