Give correct prototype for instances of AsyncGeneratorFunction

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2020-02-10 20:43:05 +09:00 committed by Hyukwoo Park
commit e38424a036
2 changed files with 1 additions and 28 deletions

View file

@ -45,7 +45,7 @@ ScriptFunctionObject::ScriptFunctionObject(ExecutionState& state, CodeBlock* cod
initStructureAndValues(state, isConstructor, isGenerator, isAsync);
if (UNLIKELY(isGenerator && isAsync)) {
Object::setPrototypeForIntrinsicObjectCreation(state, state.context()->globalObject()->asyncFunctionPrototype());
Object::setPrototypeForIntrinsicObjectCreation(state, state.context()->globalObject()->asyncGenerator());
} else if (UNLIKELY(isGenerator)) {
Object::setPrototypeForIntrinsicObjectCreation(state, state.context()->globalObject()->generator());
} else if (UNLIKELY(isAsync)) {