Chromium Code Reviews| 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) |