Index: third_party/WebKit/Source/core/dom/Document.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
index 7b68c8dd8cf13d314a80354bda77fd244b747848..1b49e4059790cb0f91029de98ece39b33db2addb 100644 |
--- a/third_party/WebKit/Source/core/dom/Document.cpp |
+++ b/third_party/WebKit/Source/core/dom/Document.cpp |
@@ -83,6 +83,7 @@ |
#include "core/dom/NodeChildRemovalTracker.h" |
#include "core/dom/NodeComputedStyle.h" |
#include "core/dom/NodeFilter.h" |
+#include "core/dom/NodeIntersectionObserverData.h" |
#include "core/dom/NodeIterator.h" |
#include "core/dom/NodeRareData.h" |
#include "core/dom/NodeTraversal.h" |
@@ -609,6 +610,9 @@ void Document::dispose() |
if (svgExtensions()) |
accessSVGExtensions().pauseAnimations(); |
+ if (m_intersectionObserverData) |
+ m_intersectionObserverData->dispose(); |
+ |
m_lifecycle.advanceTo(DocumentLifecycle::Disposed); |
DocumentLifecycleNotifier::notifyDocumentWasDisposed(); |
@@ -5081,6 +5085,13 @@ IntersectionObserverController& Document::ensureIntersectionObserverController() |
return *m_intersectionObserverController; |
} |
+NodeIntersectionObserverData& Document::ensureIntersectionObserverData() |
+{ |
+ if (!m_intersectionObserverData) |
+ m_intersectionObserverData = new NodeIntersectionObserverData(); |
+ return *m_intersectionObserverData; |
+} |
+ |
void Document::reportBlockedScriptExecutionToInspector(const String& directiveText) |
{ |
InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); |