mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibJS: Add getters for %{Async,}GeneratorFunction.prototype.prototype%
These exist as {Async,}GeneratorPrototype of course, but the spec doesn't always refer to them by the direct name.
This commit is contained in:
parent
0c65624a32
commit
dd547c3374
Notes:
sideshowbarker
2024-07-17 11:15:56 +09:00
Author: https://github.com/linusg
Commit: dd547c3374
Pull-request: https://github.com/SerenityOS/serenity/pull/13916
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/davidot ✅
2 changed files with 6 additions and 1 deletions
|
@ -243,7 +243,7 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> FunctionConstructor::create_dynamic
|
|||
// 33. If kind is generator, then
|
||||
if (kind == FunctionKind::Generator) {
|
||||
// a. Let prototype be OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).
|
||||
prototype = Object::create(global_object, global_object.generator_prototype());
|
||||
prototype = Object::create(global_object, global_object.generator_function_prototype_prototype());
|
||||
|
||||
// b. Perform ! DefinePropertyOrThrow(F, "prototype", PropertyDescriptor { [[Value]]: prototype, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: false }).
|
||||
function->define_direct_property(vm.names.prototype, prototype, Attribute::Writable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue