diff options
author | Linus Groh <mail@linusgroh.de> | 2022-08-22 21:47:35 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-23 13:58:30 +0100 |
commit | e3895e6c808d4606f02b26b1eaad3a3a803bba12 (patch) | |
tree | e3fe097d28b10f984df6cd67ca987a743cede389 /Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp | |
parent | 7c468b5a772342243d1b306389c34ce485033392 (diff) | |
download | serenity-e3895e6c808d4606f02b26b1eaad3a3a803bba12.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp index c95ca2c937..b40387d28d 100644 --- a/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/RegExpConstructor.cpp @@ -24,7 +24,7 @@ void RegExpConstructor::initialize(Realm& realm) // 22.2.4.1 RegExp.prototype, https://tc39.es/ecma262/#sec-regexp.prototype define_direct_property(vm.names.prototype, realm.global_object().regexp_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(2), Attribute::Configurable); } |