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

Unified Diff: Source/core/dom/NodeListsNodeData.h

Issue 413763004: Get rid of unnecessary isChildNodeList() virtual call in clearChildNodeListCache() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Second proposal Created 6 years, 5 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/Node.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/NodeListsNodeData.h
diff --git a/Source/core/dom/NodeListsNodeData.h b/Source/core/dom/NodeListsNodeData.h
index 8717d1ec0eca6af845f2d8e1477be06a566784d7..1029929e5c96b0344a2d8d5808644f0ab2aff97b 100644
--- a/Source/core/dom/NodeListsNodeData.h
+++ b/Source/core/dom/NodeListsNodeData.h
@@ -37,10 +37,10 @@ class NodeListsNodeData FINAL : public NoBaseWillBeGarbageCollectedFinalized<Nod
WTF_MAKE_NONCOPYABLE(NodeListsNodeData);
WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
- void clearChildNodeListCache()
+ ChildNodeList* childNodeList(ContainerNode& node)
{
- if (m_childNodeList && m_childNodeList->isChildNodeList())
- toChildNodeList(m_childNodeList)->invalidateCache();
+ ASSERT_UNUSED(node, !m_childNodeList || node == m_childNodeList->virtualOwnerNode());
+ return toChildNodeList(m_childNodeList);
}
PassRefPtrWillBeRawPtr<ChildNodeList> ensureChildNodeList(ContainerNode& node)
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698