1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:07:34 +00:00

LibJS: Fix the prototype of AsyncFunctionDriverWrapper's Promise base

This commit is contained in:
Linus Groh 2022-08-16 00:20:49 +01:00
parent 8ceef031e8
commit 4c300cc5e8

View file

@ -19,7 +19,7 @@ ThrowCompletionOr<Value> AsyncFunctionDriverWrapper::create(GlobalObject& global
}
AsyncFunctionDriverWrapper::AsyncFunctionDriverWrapper(GlobalObject& global_object, GeneratorObject* generator_object)
: Promise(global_object)
: Promise(*global_object.promise_prototype())
, m_generator_object(generator_object)
, m_on_fulfillment(NativeFunction::create(global_object, "async.on_fulfillment"sv, [this](VM& vm, GlobalObject& global_object) {
return react_to_async_task_completion(vm, global_object, vm.argument(0), true);