summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-15 20:02:57 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-16 09:59:56 +0100
commit111a38c464b1d4f00812d709b5f7cf9e72f94717 (patch)
tree9c8c448c8dfeb0a059cdb57bf0ff336a48fe21ae /Userland/Libraries/LibWeb/DOM/EventTarget.cpp
parent107e06a396e6c42b1dce4bf032ae356941ac4a48 (diff)
downloadserenity-111a38c464b1d4f00812d709b5f7cf9e72f94717.zip
LibJS: Convert new_object_environment() to NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/EventTarget.cpp')
-rw-r--r--Userland/Libraries/LibWeb/DOM/EventTarget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
index 6eb41e5bc3..45a7fea65b 100644
--- a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
+++ b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
@@ -437,7 +437,7 @@ WebIDL::CallbackType* EventTarget::get_current_value_of_event_handler(FlyString
auto& realm = settings_object.realm();
// 2. Let scope be realm.[[GlobalEnv]].
- JS::Environment* scope = &realm.global_environment();
+ auto scope = JS::NonnullGCPtr<JS::Environment> { realm.global_environment() };
// 3. If eventHandler is an element's event handler, then set scope to NewObjectEnvironment(document, true, scope).
// (Otherwise, eventHandler is a Window object's event handler.)