diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2025-03-13 16:04:38 +0100 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2025-03-13 16:04:38 +0100 |
commit | 6474793e381eb52242c1c6b443d909f09777d63f (patch) | |
tree | 612a3fe0726ba53d541733b422b645241f938dff /quickjs.c | |
parent | 030333cff616043858b32dc32405f9776372a0e6 (diff) | |
download | quickjs-6474793e381eb52242c1c6b443d909f09777d63f.tar.gz quickjs-6474793e381eb52242c1c6b443d909f09777d63f.zip |
JS_SetPropertyInternal(): avoid recursing thru the prototypes if the property is found in a prototype
Diffstat (limited to 'quickjs.c')
-rw-r--r-- | quickjs.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; } } } |