JS_SetPropertyInternal(): avoid recursing thru the prototypes if the property is found in a prototype

This commit is contained in:
Fabrice Bellard 2025-03-13 16:04:38 +01:00
parent 030333cff6
commit 6474793e38

View File

@ -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;
}
}
}