Skip to content

Commit 3ab8ab6

Browse files
Fabrice Bellardsaghul
authored andcommitted
JS_SetPropertyInternal(): avoid recursing thru the prototypes if the property is found in a prototype
1 parent 57fe819 commit 3ab8ab6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

quickjs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8930,6 +8930,8 @@ static int JS_SetPropertyInternal2(JSContext *ctx, JSValueConst obj, JSAtom prop
89308930
goto retry2;
89318931
} else if (!(prs->flags & JS_PROP_WRITABLE)) {
89328932
goto read_only_prop;
8933+
} else {
8934+
break;
89338935
}
89348936
}
89358937
}

0 commit comments

Comments
 (0)