summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-06-12 01:43:33 +0300
committerLinus Groh <mail@linusgroh.de>2021-06-12 00:44:15 +0100
commita1f5357ad32584a10b9192ad148446ee14f24da2 (patch)
treef14194a22d7e9c77510ffd8c68c9bb96c2445c04
parent7f6d3818a2e296ccd50c493c97a156152dbbb0db (diff)
downloadserenity-a1f5357ad32584a10b9192ad148446ee14f24da2.zip
LibJS: Expose Symbol.species properties as getters
As required by the specification.
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/SetConstructor.cpp2
-rw-r--r--Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp2
6 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp
index 99e4239c8d..bedb89a2d0 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayBufferConstructor.cpp
@@ -26,7 +26,7 @@ void ArrayBufferConstructor::initialize(GlobalObject& global_object)
define_property(vm.names.length, Value(1), Attribute::Configurable);
define_native_function(vm.names.isView, is_view, 1, attr);
- define_native_property(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
+ define_native_accessor(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
}
ArrayBufferConstructor::~ArrayBufferConstructor()
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
index 59a28eccda..aa54b55f94 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
@@ -38,7 +38,7 @@ void ArrayConstructor::initialize(GlobalObject& global_object)
define_native_function(vm.names.isArray, is_array, 1, attr);
define_native_function(vm.names.of, of, 0, attr);
- define_native_property(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
+ define_native_accessor(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
}
Value ArrayConstructor::call()
diff --git a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
index 492165ed21..2dbb436de8 100644
--- a/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/PromiseConstructor.cpp
@@ -36,7 +36,7 @@ void PromiseConstructor::initialize(GlobalObject& global_object)
define_native_function(vm.names.reject, reject, 1, attr);
define_native_function(vm.names.resolve, resolve, 1, attr);
- define_native_property(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
+ define_native_accessor(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
}
Value PromiseConstructor::call()
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp
index 0642b8fdbd..496efe0913 100644
--- a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp
@@ -23,7 +23,7 @@ void RegExpConstructor::initialize(GlobalObject& global_object)
define_property(vm.names.prototype, global_object.regexp_prototype(), 0);
define_property(vm.names.length, Value(2), Attribute::Configurable);
- define_native_property(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
+ define_native_accessor(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
}
RegExpConstructor::~RegExpConstructor()
diff --git a/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp b/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp
index 2a3b9c2af2..3ddae1ca65 100644
--- a/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/SetConstructor.cpp
@@ -24,7 +24,7 @@ void SetConstructor::initialize(GlobalObject& global_object)
define_property(vm.names.prototype, global_object.set_prototype(), 0);
define_property(vm.names.length, Value(0), Attribute::Configurable);
- define_native_property(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
+ define_native_accessor(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
}
SetConstructor::~SetConstructor()
diff --git a/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
index f9e958b241..799f400aa8 100644
--- a/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
@@ -26,7 +26,7 @@ void TypedArrayConstructor::initialize(GlobalObject& global_object)
define_property(vm.names.prototype, global_object.typed_array_prototype(), 0);
define_property(vm.names.length, Value(0), Attribute::Configurable);
- define_native_property(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
+ define_native_accessor(vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
}
TypedArrayConstructor::~TypedArrayConstructor()