1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +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:
Linus Groh 2022-05-05 08:49:46 +02:00
parent 0c65624a32
commit dd547c3374
2 changed files with 6 additions and 1 deletions

View file

@ -40,6 +40,11 @@ public:
Object* async_generator_prototype() { return m_async_generator_prototype; }
Object* generator_prototype() { return m_generator_prototype; }
// Alias for the AsyncGenerator Prototype Object used by the spec (%AsyncGeneratorFunction.prototype.prototype%)
Object* async_generator_function_prototype_prototype() { return m_async_generator_prototype; }
// Alias for the Generator Prototype Object used by the spec (%GeneratorFunction.prototype.prototype%)
Object* generator_function_prototype_prototype() { return m_generator_prototype; }
// Not included in JS_ENUMERATE_INTL_OBJECTS due to missing distinct constructor
Object* intl_segments_prototype() { return m_intl_segments_prototype; }