mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:25:07 +00:00
LibJS: Do not create a prototype property on AsyncFunction instances
This commit is contained in:
parent
08d1ae58b1
commit
29dd9d75ef
1 changed files with 4 additions and 1 deletions
|
@ -127,7 +127,10 @@ void ECMAScriptFunctionObject::initialize(GlobalObject& global_object)
|
|||
// FIXME: Add the AsyncGeneratorObject and set it as prototype.
|
||||
break;
|
||||
}
|
||||
define_direct_property(vm.names.prototype, prototype, Attribute::Writable);
|
||||
// 27.7.4 AsyncFunction Instances, https://tc39.es/ecma262/#sec-async-function-instances
|
||||
// AsyncFunction instances do not have a prototype property as they are not constructible.
|
||||
if (m_kind != FunctionKind::Async)
|
||||
define_direct_property(vm.names.prototype, prototype, Attribute::Writable);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue