1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

LibJS: Convert new_object_environment() to NonnullGCPtr

This commit is contained in:
Linus Groh 2022-12-15 20:02:57 +00:00 committed by Andreas Kling
parent 107e06a396
commit 111a38c464
5 changed files with 5 additions and 5 deletions

View file

@ -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.)