mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:07:47 +00:00
LibJS: Pass Realm to define_native_{accessor,function}()
This is needed so that the allocated NativeFunction receives the correct realm, usually forwarded from the Object's initialize() function, rather than using the current realm.
This commit is contained in:
parent
7c468b5a77
commit
e3895e6c80
116 changed files with 893 additions and 890 deletions
|
@ -26,7 +26,7 @@ void MapConstructor::initialize(Realm& realm)
|
|||
// 24.1.2.1 Map.prototype, https://tc39.es/ecma262/#sec-map.prototype
|
||||
define_direct_property(vm.names.prototype, realm.global_object().map_prototype(), 0);
|
||||
|
||||
define_native_accessor(*vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
|
||||
define_native_accessor(realm, *vm.well_known_symbol_species(), symbol_species_getter, {}, Attribute::Configurable);
|
||||
|
||||
define_direct_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue