summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-06-26 17:05:29 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-26 17:06:36 +0200
commit9683b10aec4fd01357c6255c4763ba07477e44ab (patch)
treeeddad96f94ac5b5da3c81e23da9551861fc35723 /Userland/Libraries
parent49018553d332280bc1f15ee102ad8235d66ce76d (diff)
downloadserenity-9683b10aec4fd01357c6255c4763ba07477e44ab.zip
LibJS: Make sure `this` in the global environment is the global object
Fixes regressed with 0f9038b732a6e0f5830e5e95c0b2a1c78efea415.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Runtime/GlobalObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
index 5217340603..e06db34dca 100644
--- a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
@@ -99,7 +99,7 @@ void GlobalObject::initialize_global_object()
m_object_prototype = heap().allocate_without_global_object<ObjectPrototype>(*this);
m_function_prototype = heap().allocate_without_global_object<FunctionPrototype>(*this);
- m_environment_record = heap().allocate_without_global_object<GlobalEnvironmentRecord>(*this);
+ m_environment_record = heap().allocate<GlobalEnvironmentRecord>(*this, *this);
m_new_object_shape = vm.heap().allocate_without_global_object<Shape>(*this);
m_new_object_shape->set_prototype_without_transition(m_object_prototype);