mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:58:12 +00:00
LibJS: Don't repeat attributes in {Date,Symbol}Constructor
This commit is contained in:
parent
7327a28ccc
commit
8d1e6e9175
2 changed files with 7 additions and 5 deletions
|
@ -134,9 +134,10 @@ void DateConstructor::initialize(GlobalObject& global_object)
|
|||
|
||||
define_property(vm.names.length, Value(7), Attribute::Configurable);
|
||||
|
||||
define_native_function(vm.names.now, now, 0, Attribute::Writable | Attribute::Configurable);
|
||||
define_native_function(vm.names.parse, parse, 1, Attribute::Writable | Attribute::Configurable);
|
||||
define_native_function(vm.names.UTC, utc, 1, Attribute::Writable | Attribute::Configurable);
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.now, now, 0, attr);
|
||||
define_native_function(vm.names.parse, parse, 1, attr);
|
||||
define_native_function(vm.names.UTC, utc, 1, attr);
|
||||
}
|
||||
|
||||
DateConstructor::~DateConstructor()
|
||||
|
|
|
@ -25,8 +25,9 @@ void SymbolConstructor::initialize(GlobalObject& global_object)
|
|||
|
||||
define_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||
|
||||
define_native_function(vm.names.for_, for_, 1, Attribute::Writable | Attribute::Configurable);
|
||||
define_native_function(vm.names.keyFor, key_for, 1, Attribute::Writable | 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);
|
||||
|
||||
#define __JS_ENUMERATE(SymbolName, snake_name) \
|
||||
define_property(vm.names.SymbolName, vm.well_known_symbol_##snake_name(), 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue