mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Fix GC leak in js_proxy_get()
Fixes: https://github.com/bellard/quickjs/issues/277
This commit is contained in:
parent
bc1e3cd009
commit
da5b95dcaf
1 changed files with 3 additions and 1 deletions
|
@ -44459,8 +44459,10 @@ static JSValue js_proxy_get(JSContext *ctx, JSValue obj, JSAtom atom,
|
||||||
if (JS_IsException(ret))
|
if (JS_IsException(ret))
|
||||||
return JS_EXCEPTION;
|
return JS_EXCEPTION;
|
||||||
res = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(s->target), atom);
|
res = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(s->target), atom);
|
||||||
if (res < 0)
|
if (res < 0) {
|
||||||
|
JS_FreeValue(ctx, ret);
|
||||||
return JS_EXCEPTION;
|
return JS_EXCEPTION;
|
||||||
|
}
|
||||||
if (res) {
|
if (res) {
|
||||||
if ((desc.flags & (JS_PROP_GETSET | JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE)) == 0) {
|
if ((desc.flags & (JS_PROP_GETSET | JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE)) == 0) {
|
||||||
if (!js_same_value(ctx, desc.value, ret)) {
|
if (!js_same_value(ctx, desc.value, ret)) {
|
||||||
|
|
Loading…
Reference in a new issue