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

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

Issue 146973007: Kill NodeListNameCacheMap cache in NodeListsNodeData (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 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
« no previous file with comments | « Source/core/dom/NodeRareData.h ('k') | no next file » | 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 bbd863e8c68dd43aea889b838647899689b3a949..82717cb2afe01dc784acaa3294f96439ec904065 100644
--- a/Source/core/dom/NodeRareData.cpp
+++ b/Source/core/dom/NodeRareData.cpp
@@ -40,4 +40,19 @@ struct SameSizeAsNodeRareData {
COMPILE_ASSERT(sizeof(NodeRareData) == sizeof(SameSizeAsNodeRareData), NodeRareDataShouldStaySmall);
+void NodeListsNodeData::invalidateCaches(const QualifiedName* attrName)
+{
+ NodeListAtomicNameCacheMap::const_iterator atomicNameCacheEnd = m_atomicNameCaches.end();
+ for (NodeListAtomicNameCacheMap::const_iterator it = m_atomicNameCaches.begin(); it != atomicNameCacheEnd; ++it)
+ it->value->invalidateCache(attrName);
+
+ if (attrName)
+ return;
+
+ TagCollectionCacheNS::iterator tagCacheEnd = m_tagCollectionCacheNS.end();
+ for (TagCollectionCacheNS::iterator it = m_tagCollectionCacheNS.begin(); it != tagCacheEnd; ++it)
+ it->value->invalidateCache();
+}
+
+
} // namespace WebCore
« no previous file with comments | « Source/core/dom/NodeRareData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698