mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibWeb: Don't store root as JS::Handle in IntersectionObserver
Instead, use a JS::GCPtr and visit it, to prevent GC reference cycles.
This commit is contained in:
Notes:
sideshowbarker
2024-07-16 23:59:28 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/518cedc8f3 Pull-request: https://github.com/SerenityOS/serenity/pull/23815 Reviewed-by: https://github.com/ADKaster
@@ -73,7 +73,7 @@ private:
|
||||
JS::GCPtr<WebIDL::CallbackType> m_callback;
|
||||
|
||||
// https://www.w3.org/TR/intersection-observer/#dom-intersectionobserver-root
|
||||
Optional<Variant<JS::Handle<DOM::Element>, JS::Handle<DOM::Document>>> m_root;
|
||||
JS::GCPtr<DOM::Node> m_root;
|
||||
|
||||
// https://www.w3.org/TR/intersection-observer/#dom-intersectionobserver-thresholds
|
||||
Vector<double> m_thresholds;
|
||||
|
||||
Reference in New Issue
Block a user