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

Side by Side Diff: third_party/WebKit/Source/core/html/CollectionItemsCache.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012,2013 Google Inc. All rights reserved. 2 * Copyright (C) 2012,2013 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Apple Inc. All rights reserved. 3 * Copyright (C) 2014 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void invalidate(); 59 void invalidate();
60 60
61 private: 61 private:
62 ptrdiff_t allocationSize() const { return m_cachedList.capacity() * sizeof(N odeType*); } 62 ptrdiff_t allocationSize() const { return m_cachedList.capacity() * sizeof(N odeType*); }
63 static void reportExtraMemoryCostForCollectionItemsCache(ptrdiff_t diff) 63 static void reportExtraMemoryCostForCollectionItemsCache(ptrdiff_t diff)
64 { 64 {
65 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(diff); 65 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(diff);
66 } 66 }
67 67
68 bool m_listValid; 68 bool m_listValid;
69 WillBeHeapVector<RawPtrWillBeMember<NodeType>> m_cachedList; 69 HeapVector<Member<NodeType>> m_cachedList;
70 }; 70 };
71 71
72 template <typename Collection, typename NodeType> 72 template <typename Collection, typename NodeType>
73 CollectionItemsCache<Collection, NodeType>::CollectionItemsCache() 73 CollectionItemsCache<Collection, NodeType>::CollectionItemsCache()
74 : m_listValid(false) 74 : m_listValid(false)
75 { 75 {
76 } 76 }
77 77
78 template <typename Collection, typename NodeType> 78 template <typename Collection, typename NodeType>
79 CollectionItemsCache<Collection, NodeType>::~CollectionItemsCache() 79 CollectionItemsCache<Collection, NodeType>::~CollectionItemsCache()
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if (m_listValid) { 119 if (m_listValid) {
120 ASSERT(this->isCachedNodeCountValid()); 120 ASSERT(this->isCachedNodeCountValid());
121 return index < this->cachedNodeCount() ? m_cachedList[index] : nullptr; 121 return index < this->cachedNodeCount() ? m_cachedList[index] : nullptr;
122 } 122 }
123 return Base::nodeAt(collection, index); 123 return Base::nodeAt(collection, index);
124 } 124 }
125 125
126 } // namespace blink 126 } // namespace blink
127 127
128 #endif // CollectionItemsCache_h 128 #endif // CollectionItemsCache_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698