From 000db3aab3efc46274182237d444bfd63a65dfc6 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Mon, 21 Apr 2025 11:52:42 +0200 Subject: [PATCH] the %TypedArray% Intrinsic Object should be a constructor --- quickjs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickjs.c b/quickjs.c index 8b0b04f..58b19d1 100644 --- a/quickjs.c +++ b/quickjs.c @@ -54253,8 +54253,8 @@ void JS_AddIntrinsicTypedArrays(JSContext *ctx) JS_DefinePropertyValue(ctx, typed_array_base_proto, JS_ATOM_toString, obj, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE); - typed_array_base_func = JS_NewCFunction(ctx, js_typed_array_base_constructor, - "TypedArray", 0); + typed_array_base_func = JS_NewCFunction2(ctx, js_typed_array_base_constructor, + "TypedArray", 0, JS_CFUNC_constructor_or_func, 0); JS_SetPropertyFunctionList(ctx, typed_array_base_func, js_typed_array_base_funcs, countof(js_typed_array_base_funcs));