| Index: Source/core/html/CollectionIndexCache.h
|
| diff --git a/Source/core/html/CollectionIndexCache.h b/Source/core/html/CollectionIndexCache.h
|
| index 9898de0cf274d2cf10c7f3d6098b805ff29f8afe..865104ba059bca18e0db99bf67ae0a5a6faef009 100644
|
| --- a/Source/core/html/CollectionIndexCache.h
|
| +++ b/Source/core/html/CollectionIndexCache.h
|
| @@ -38,6 +38,7 @@ namespace WebCore {
|
|
|
| template <typename Collection, typename NodeType>
|
| class CollectionIndexCache {
|
| + DISALLOW_ALLOCATION();
|
| public:
|
| CollectionIndexCache();
|
|
|
| @@ -63,6 +64,11 @@ public:
|
|
|
| void invalidate();
|
|
|
| + void trace(Visitor* visitor)
|
| + {
|
| + visitor->trace(m_currentNode);
|
| + }
|
| +
|
| private:
|
| NodeType* nodeBeforeCachedNode(const Collection&, unsigned index);
|
| NodeType* nodeAfterCachedNode(const Collection&, unsigned index);
|
| @@ -84,7 +90,7 @@ private:
|
| m_isLengthCacheValid = true;
|
| }
|
|
|
| - NodeType* m_currentNode;
|
| + RawPtrWillBeMember<NodeType> m_currentNode;
|
| unsigned m_cachedNodeCount;
|
| unsigned m_cachedNodeIndex;
|
| unsigned m_isLengthCacheValid : 1;
|
| @@ -92,7 +98,7 @@ private:
|
|
|
| template <typename Collection, typename NodeType>
|
| CollectionIndexCache<Collection, NodeType>::CollectionIndexCache()
|
| - : m_currentNode(0)
|
| + : m_currentNode(nullptr)
|
| , m_cachedNodeCount(0)
|
| , m_cachedNodeIndex(0)
|
| , m_isLengthCacheValid(false)
|
| @@ -102,7 +108,7 @@ CollectionIndexCache<Collection, NodeType>::CollectionIndexCache()
|
| template <typename Collection, typename NodeType>
|
| void CollectionIndexCache<Collection, NodeType>::invalidate()
|
| {
|
| - m_currentNode = 0;
|
| + m_currentNode = nullptr;
|
| m_isLengthCacheValid = false;
|
| }
|
|
|
|
|