Add JS_FreePropertyEnum corresponding to JS_GetOwnPropertyNames

This commit is contained in:
Icemic 2024-05-23 23:50:15 +08:00 committed by Charlie Gordon
parent 921c1eef50
commit 9a2a246b51
2 changed files with 8 additions and 0 deletions

View file

@ -7808,6 +7808,12 @@ int JS_GetOwnProperty(JSContext *ctx, JSPropertyDescriptor *desc,
return JS_GetOwnPropertyInternal(ctx, desc, JS_VALUE_GET_OBJ(obj), prop); return JS_GetOwnPropertyInternal(ctx, desc, JS_VALUE_GET_OBJ(obj), prop);
} }
void JS_FreePropertyEnum(JSContext *ctx, JSPropertyEnum *tab,
uint32_t len)
{
js_free_prop_enum(ctx, tab, len);
}
/* return -1 if exception (Proxy object only) or TRUE/FALSE */ /* return -1 if exception (Proxy object only) or TRUE/FALSE */
int JS_IsExtensible(JSContext *ctx, JSValue obj) int JS_IsExtensible(JSContext *ctx, JSValue obj)
{ {

View file

@ -707,6 +707,8 @@ JS_EXTERN int JS_GetOwnPropertyNames(JSContext *ctx, JSPropertyEnum **ptab,
uint32_t *plen, JSValue obj, int flags); uint32_t *plen, JSValue obj, int flags);
JS_EXTERN int JS_GetOwnProperty(JSContext *ctx, JSPropertyDescriptor *desc, JS_EXTERN int JS_GetOwnProperty(JSContext *ctx, JSPropertyDescriptor *desc,
JSValue obj, JSAtom prop); JSValue obj, JSAtom prop);
JS_EXTERN void JS_FreePropertyEnum(JSContext *ctx, JSPropertyEnum *tab,
uint32_t len);
JS_EXTERN JSValue JS_Call(JSContext *ctx, JSValue func_obj, JSValue this_obj, JS_EXTERN JSValue JS_Call(JSContext *ctx, JSValue func_obj, JSValue this_obj,
int argc, JSValue *argv); int argc, JSValue *argv);