mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00: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:
parent
52fa415779
commit
518cedc8f3
Notes:
sideshowbarker
2024-07-16 23:59:28 +09:00
Author: https://github.com/awesomekling
Commit: 518cedc8f3
Pull-request: https://github.com/SerenityOS/serenity/pull/23815
Reviewed-by: https://github.com/ADKaster
2 changed files with 16 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue