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

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

Issue 2684733002: IntersectionObserver: discard notifications upon disconnect(). (Closed)
Patch Set: Add layout test Created 3 years, 10 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.cpp
diff --git a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
index 779e0a33ee2e35c852bc3c5e199561fbdf7750b4..85dc34831757df6dfc68c3aa100ba96d0073f147 100644
--- a/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
+++ b/third_party/WebKit/Source/core/dom/IntersectionObserver.cpp
@@ -306,6 +306,7 @@ void IntersectionObserver::disconnect(ExceptionState& exceptionState) {
for (auto& observation : m_observations)
observation->disconnect();
m_observations.clear();
+ m_entries.clear();
}
HeapVector<Member<IntersectionObserverEntry>> IntersectionObserver::takeRecords(

Powered by Google App Engine
This is Rietveld 408576698