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

Unified Diff: Source/core/dom/NodeRareData.cpp

Issue 280123002: Oilpan: move LiveNodeList collections to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have NodeRareData clear out NodeListsNodeData instead. Created 6 years, 7 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
« no previous file with comments | « Source/core/dom/NodeRareData.h ('k') | Source/core/dom/ParentNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeRareData.cpp
diff --git a/Source/core/dom/NodeRareData.cpp b/Source/core/dom/NodeRareData.cpp
index c29894c2a00a5f2807675c7d17679ae65a955043..e8ea37076c25375c942b18c4bbddd74e8e6501b0 100644
--- a/Source/core/dom/NodeRareData.cpp
+++ b/Source/core/dom/NodeRareData.cpp
@@ -58,9 +58,21 @@ void NodeListsNodeData::invalidateCaches(const QualifiedName* attrName)
it->value->invalidateCache();
}
+void NodeListsNodeData::trace(Visitor* visitor)
+{
+ visitor->trace(m_childNodeList);
+ visitor->trace(m_atomicNameCaches);
+ visitor->trace(m_tagCollectionCacheNS);
+}
+
void NodeRareData::traceAfterDispatch(Visitor* visitor)
{
visitor->trace(m_mutationObserverData);
+ // Do not keep empty NodeListsNodeData objects around.
+ if (m_nodeLists && m_nodeLists->isEmpty())
+ m_nodeLists.clear();
+ else
+ visitor->trace(m_nodeLists);
}
void NodeRareData::trace(Visitor* visitor)
« no previous file with comments | « Source/core/dom/NodeRareData.h ('k') | Source/core/dom/ParentNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698