mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibJS: Expose Symbol.species properties as getters
As required by the specification.
This commit is contained in:
parent
7f6d3818a2
commit
a1f5357ad3
Notes:
sideshowbarker
2024-07-18 12:23:12 +09:00
Author: https://github.com/IdanHo
Commit: a1f5357ad3
Pull-request: https://github.com/SerenityOS/serenity/pull/8011
6 changed files with 6 additions and 6 deletions
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue