diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2025-04-22 19:03:18 +0200 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2025-04-22 19:03:18 +0200 |
commit | a0a760f74fd0c28ee56dc0971ba60e45d844e41f (patch) | |
tree | b3eb5dbf5fa598d463505a991cced806f3eddea9 | |
parent | b32cccb5fe1da1cdaad68dc56942a49d41d205a3 (diff) | |
download | quickjs-a0a760f74fd0c28ee56dc0971ba60e45d844e41f.tar.gz quickjs-a0a760f74fd0c28ee56dc0971ba60e45d844e41f.zip |
fixed GeneratorFunction prototype
-rw-r--r-- | quickjs.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -51267,9 +51267,10 @@ void JS_AddIntrinsicBaseObjects(JSContext *ctx) countof(js_generator_proto_funcs)); ctx->class_proto[JS_CLASS_GENERATOR_FUNCTION] = JS_NewObjectProto(ctx, ctx->function_proto); - obj1 = JS_NewCFunctionMagic(ctx, js_function_constructor, - "GeneratorFunction", 1, - JS_CFUNC_constructor_or_func_magic, JS_FUNC_GENERATOR); + obj1 = JS_NewCFunction3(ctx, (JSCFunction *)js_function_constructor, + "GeneratorFunction", 1, + JS_CFUNC_constructor_or_func_magic, JS_FUNC_GENERATOR, + ctx->function_ctor); JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_GENERATOR_FUNCTION], js_generator_function_proto_funcs, |