mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb: Visit IntersectionObserverRegistration instead of using Handle
This fixes GC-leak caused by JS::Handle<IntersectionObserverver> preventing an element that owns the handle from being deallocated.
This commit is contained in:
committed by
Andreas Kling
parent
ac5c4705fd
commit
35623ad52e
Notes:
sideshowbarker
2024-07-17 05:06:13 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/35623ad52e Pull-request: https://github.com/SerenityOS/serenity/pull/21235
@@ -92,7 +92,7 @@ void IntersectionObserver::observe(DOM::Element& target)
|
||||
// property set to observer, a previousThresholdIndex property set to -1, and a previousIsIntersecting
|
||||
// property set to false.
|
||||
auto intersection_observer_registration = IntersectionObserverRegistration {
|
||||
.observer = JS::make_handle(*this),
|
||||
.observer = *this,
|
||||
.previous_threshold_index = OptionalNone {},
|
||||
.previous_is_intersecting = false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user