mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
LibJS: Mark %{Async,}IteratorPrototype%[@@iterator] as Configurable
We were accidentally marking it as Enumerable instead.
This commit is contained in:
parent
5b32b46ebc
commit
232e830a0a
2 changed files with 3 additions and 2 deletions
|
@ -17,7 +17,7 @@ void AsyncIteratorPrototype::initialize(GlobalObject& global_object)
|
||||||
{
|
{
|
||||||
auto& vm = this->vm();
|
auto& vm = this->vm();
|
||||||
Object::initialize(global_object);
|
Object::initialize(global_object);
|
||||||
u8 attr = Attribute::Writable | Attribute::Enumerable;
|
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||||
define_native_function(*vm.well_known_symbol_async_iterator(), symbol_async_iterator, 0, attr);
|
define_native_function(*vm.well_known_symbol_async_iterator(), symbol_async_iterator, 0, attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
|
// 27.1.2 The %IteratorPrototype% Object, https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
||||||
IteratorPrototype::IteratorPrototype(GlobalObject& global_object)
|
IteratorPrototype::IteratorPrototype(GlobalObject& global_object)
|
||||||
: Object(*global_object.object_prototype())
|
: Object(*global_object.object_prototype())
|
||||||
{
|
{
|
||||||
|
@ -19,7 +20,7 @@ void IteratorPrototype::initialize(GlobalObject& global_object)
|
||||||
{
|
{
|
||||||
auto& vm = this->vm();
|
auto& vm = this->vm();
|
||||||
Object::initialize(global_object);
|
Object::initialize(global_object);
|
||||||
u8 attr = Attribute::Writable | Attribute::Enumerable;
|
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||||
define_native_function(*vm.well_known_symbol_iterator(), symbol_iterator, 0, attr);
|
define_native_function(*vm.well_known_symbol_iterator(), symbol_iterator, 0, attr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue