diff options
author | Linus Groh <mail@linusgroh.de> | 2022-08-16 00:20:49 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-23 13:58:30 +0100 |
commit | 5dd5896588b0e5a7bc7bdadeaa7dd4865f663b79 (patch) | |
tree | b8c099aac88ad59a9fb06624fd6245f9662a9796 /Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp | |
parent | ecd163bdf1cbf8c9bca9e209a385a41ff5ca4f81 (diff) | |
download | serenity-5dd5896588b0e5a7bc7bdadeaa7dd4865f663b79.zip |
LibJS+LibWeb: Replace GlobalObject with Realm in initialize() functions
This is a continuation of the previous commit.
Calling initialize() is the first thing that's done after allocating a
cell on the JS heap - and in the common case of allocating an object,
that's where properties are assigned and intrinsics occasionally
accessed.
Since those are supposed to live on the realm eventually, this is
another step into that direction.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp b/Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp index 7a3126c1be..5078b4604a 100644 --- a/Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ModuleNamespaceObject.cpp @@ -22,9 +22,9 @@ ModuleNamespaceObject::ModuleNamespaceObject(Realm& realm, Module* module, Vecto }); } -void ModuleNamespaceObject::initialize(GlobalObject& global_object) +void ModuleNamespaceObject::initialize(Realm& realm) { - Object::initialize(global_object); + Object::initialize(realm); // 28.3.1 @@toStringTag, https://tc39.es/ecma262/#sec-@@tostringtag define_direct_property(*vm().well_known_symbol_to_string_tag(), js_string(vm(), "Module"sv), 0); |