mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 00:56:14 +00:00
LibJS: Reorder and add missing name & length properties to Built-ins
The specification dicatates that each built-in will have a length and name property. (defined in that order)
This commit is contained in:
committed by
Linus Groh
parent
7e4b0681e1
commit
eeb4c1eec9
@@ -23,8 +23,6 @@ void SymbolConstructor::initialize(GlobalObject& global_object)
|
||||
// 20.4.2.9 Symbol.prototype, https://tc39.es/ecma262/#sec-symbol.prototype
|
||||
define_direct_property(vm.names.prototype, global_object.symbol_prototype(), 0);
|
||||
|
||||
define_direct_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.for_, for_, 1, attr);
|
||||
define_native_function(vm.names.keyFor, key_for, 1, attr);
|
||||
@@ -33,6 +31,8 @@ void SymbolConstructor::initialize(GlobalObject& global_object)
|
||||
define_direct_property(vm.names.SymbolName, vm.well_known_symbol_##snake_name(), 0);
|
||||
JS_ENUMERATE_WELL_KNOWN_SYMBOLS
|
||||
#undef __JS_ENUMERATE
|
||||
|
||||
define_direct_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||
}
|
||||
|
||||
SymbolConstructor::~SymbolConstructor()
|
||||
|
||||
Reference in New Issue
Block a user