mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +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
|
@ -30,7 +30,7 @@ void DurationFormatConstructor::initialize(Realm& realm)
|
|||
define_direct_property(vm.names.length, Value(0), Attribute::Configurable);
|
||||
|
||||
u8 attr = Attribute::Writable | Attribute::Configurable;
|
||||
define_native_function(vm.names.supportedLocalesOf, supported_locales_of, 1, attr);
|
||||
define_native_function(realm, vm.names.supportedLocalesOf, supported_locales_of, 1, attr);
|
||||
}
|
||||
|
||||
// 1.2.1 Intl.DurationFormat ( [ locales [ , options ] ] ), https://tc39.es/proposal-intl-duration-format/#sec-Intl.DurationFormat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue