summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-02-19 22:13:19 +0200
committerLinus Groh <mail@linusgroh.de>2022-02-19 22:16:30 +0000
commit232e830a0a58ed5ea2245e6e556de3df7f831952 (patch)
treea5a83a46f002e0db06a587bf1657a6b1504c1ac9 /Userland/Libraries/LibJS
parent5b32b46ebc4b1bc3084380d047e5197cef4e2b79 (diff)
downloadserenity-232e830a0a58ed5ea2245e6e556de3df7f831952.zip
LibJS: Mark %{Async,}IteratorPrototype%[@@iterator] as Configurable
We were accidentally marking it as Enumerable instead.
Diffstat (limited to 'Userland/Libraries/LibJS')
-rw-r--r--Userland/Libraries/LibJS/Runtime/AsyncIteratorPrototype.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/AsyncIteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/AsyncIteratorPrototype.cpp
index cd623fd749..b3e95ae5e4 100644
--- a/Userland/Libraries/LibJS/Runtime/AsyncIteratorPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/AsyncIteratorPrototype.cpp
@@ -17,7 +17,7 @@ void AsyncIteratorPrototype::initialize(GlobalObject& global_object)
{
auto& vm = this->vm();
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);
}
diff --git a/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp b/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp
index ca1a10771f..e772bdde6c 100644
--- a/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp
+++ b/Userland/Libraries/LibJS/Runtime/IteratorPrototype.cpp
@@ -10,6 +10,7 @@
namespace JS {
+// 27.1.2 The %IteratorPrototype% Object, https://tc39.es/ecma262/#sec-%iteratorprototype%-object
IteratorPrototype::IteratorPrototype(GlobalObject& global_object)
: Object(*global_object.object_prototype())
{
@@ -19,7 +20,7 @@ void IteratorPrototype::initialize(GlobalObject& global_object)
{
auto& vm = this->vm();
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);
}