| Index: third_party/WebKit/Source/core/html/CollectionItemsCache.h
|
| diff --git a/third_party/WebKit/Source/core/html/CollectionItemsCache.h b/third_party/WebKit/Source/core/html/CollectionItemsCache.h
|
| index f288ce7990c8e6bba835bf8e4b4b4b559cd28b21..50b74cf98df65c427ffd1d28cb4113bd63cffed2 100644
|
| --- a/third_party/WebKit/Source/core/html/CollectionItemsCache.h
|
| +++ b/third_party/WebKit/Source/core/html/CollectionItemsCache.h
|
| @@ -34,7 +34,6 @@
|
|
|
| #include "core/html/CollectionIndexCache.h"
|
| #include "wtf/Vector.h"
|
| -#include <v8.h>
|
|
|
| namespace blink {
|
|
|
| @@ -59,12 +58,6 @@ public:
|
| void invalidate();
|
|
|
| private:
|
| - ptrdiff_t allocationSize() const { return m_cachedList.capacity() * sizeof(NodeType*); }
|
| - static void reportExtraMemoryCostForCollectionItemsCache(ptrdiff_t diff)
|
| - {
|
| - v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(diff);
|
| - }
|
| -
|
| bool m_listValid;
|
| WillBeHeapVector<RawPtrWillBeMember<NodeType>> m_cachedList;
|
| };
|
| @@ -78,8 +71,6 @@ CollectionItemsCache<Collection, NodeType>::CollectionItemsCache()
|
| template <typename Collection, typename NodeType>
|
| CollectionItemsCache<Collection, NodeType>::~CollectionItemsCache()
|
| {
|
| - if (ptrdiff_t diff = allocationSize())
|
| - reportExtraMemoryCostForCollectionItemsCache(-diff);
|
| }
|
|
|
| template <typename Collection, typename NodeType>
|
| @@ -100,13 +91,10 @@ unsigned CollectionItemsCache<Collection, NodeType>::nodeCount(const Collection&
|
|
|
| NodeType* currentNode = collection.traverseToFirst();
|
| unsigned currentIndex = 0;
|
| - ptrdiff_t oldCapacity = allocationSize();
|
| while (currentNode) {
|
| m_cachedList.append(currentNode);
|
| currentNode = collection.traverseForwardToOffset(currentIndex + 1, *currentNode, currentIndex);
|
| }
|
| - if (ptrdiff_t diff = allocationSize() - oldCapacity)
|
| - reportExtraMemoryCostForCollectionItemsCache(diff);
|
|
|
| this->setCachedNodeCount(m_cachedList.size());
|
| m_listValid = true;
|
|
|