| 21 | } |
| 22 | |
| 23 | void AsyncGeneratorPrototype::initialize(Realm& realm) |
| 24 | { |
| 25 | auto& vm = this->vm(); |
| 26 | Base::initialize(realm); |
| 27 | u8 attr = Attribute::Writable | Attribute::Configurable; |
| 28 | define_native_function(realm, vm.names.next, next, 1, attr); |
| 29 | define_native_function(realm, vm.names.return_, return_, 1, attr); |
| 30 | define_native_function(realm, vm.names.throw_, throw_, 1, attr); |
| 31 | |
| 32 | // 27.6.1.5 AsyncGenerator.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-asyncgenerator-prototype-tostringtag |
| 33 | define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, "AsyncGenerator"_utf16_fly_string), Attribute::Configurable); |
| 34 | } |
| 35 | |
| 36 | // 27.6.3.3 AsyncGeneratorValidate ( generator, generatorBrand ), https://tc39.es/ecma262/#sec-asyncgeneratorvalidate |
| 37 | static ThrowCompletionOr<GC::Ref<AsyncGenerator>> async_generator_validate(VM& vm, Value generator, Optional<String> generator_brand) |
nothing calls this directly
no test coverage detected