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

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: 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..2dd3923dd77741c9f922a943fe56b1216f199f5c 100644
--- a/Source/core/dom/NodeListsNodeData.h
+++ b/Source/core/dom/NodeListsNodeData.h
@@ -39,8 +39,11 @@ class NodeListsNodeData FINAL : public NoBaseWillBeGarbageCollectedFinalized<Nod
public:
void clearChildNodeListCache()
{
- if (m_childNodeList && m_childNodeList->isChildNodeList())
+ if (m_childNodeList) {
+ // This can only be called from ContainerNode so casting to ChildNodeList
adamk 2014/07/24 22:06:20 This seems a bit unsafe, since there's nothing (ex
Inactive 2014/07/25 00:09:50 Yes, there is an assertion in the casting function
+ // is safe.
toChildNodeList(m_childNodeList)->invalidateCache();
+ }
}
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