Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: third_party/WebKit/Source/core/dom/IntersectionObserver.h

Issue 1591763003: Use registerWeakMembers to clean up IntersectionObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/IntersectionObserver.h
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.h b/third_party/WebKit/Source/core/dom/IntersectionObserver.h
index f793a6f958543add45b3d8b5810b6d6c2297357d..a918acb4cab2f8f6a182a4fbfbeecd9ebbc6672f 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.h
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.h
@@ -27,6 +27,7 @@ class IntersectionObserver final : public GarbageCollectedFinalized<Intersection
public:
static IntersectionObserver* create(const IntersectionObserverInit&, IntersectionObserverCallback&, ExceptionState&);
static void resumeSuspendedObservers();
+ static void rootDisappearedCallback(Visitor*, void*);
// API methods
void observe(Element*, ExceptionState&);
@@ -56,8 +57,6 @@ public:
private:
explicit IntersectionObserver(IntersectionObserverCallback&, Node&, const Vector<Length>& rootMargin, const Vector<float>& thresholds);
- void checkRootAndDetachIfNeeded();
-
Member<IntersectionObserverCallback> m_callback;
WeakPtrWillBeWeakMember<Node> m_root;
HeapHashSet<WeakMember<IntersectionObservation>> m_observations;

Powered by Google App Engine
This is Rietveld 408576698