]> git.kaiwu.me - quickjs.git/commitdiff
JS_SetPropertyInternal(): avoid recursing thru the prototypes if the property is...
authorFabrice Bellard <fabrice@bellard.org>
Thu, 13 Mar 2025 15:04:38 +0000 (16:04 +0100)
committerFabrice Bellard <fabrice@bellard.org>
Thu, 13 Mar 2025 15:04:38 +0000 (16:04 +0100)
quickjs.c

index d7dc6d7f0ebfc23816cc7c42a355f3a2ef65fd03..4f42f0605d7479e693bc30159814af2ea72ac74b 100644 (file)
--- a/quickjs.c
+++ b/quickjs.c
@@ -8601,6 +8601,8 @@ int JS_SetPropertyInternal(JSContext *ctx, JSValueConst obj,
                 goto retry2;
             } else if (!(prs->flags & JS_PROP_WRITABLE)) {
                 goto read_only_prop;
+            } else {
+                break;
             }
         }
     }