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

Unified Diff: third_party/WebKit/Source/wtf/Deque.h

Issue 2065443002: Rename and improve "traceable" templates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment rewording Created 4 years, 6 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
Index: third_party/WebKit/Source/wtf/Deque.h
diff --git a/third_party/WebKit/Source/wtf/Deque.h b/third_party/WebKit/Source/wtf/Deque.h
index eba8660706cac430d3c5b9e1193624561e13a5a3..8194748eb31abf95c78b76233f8625a9b65f2bcc 100644
--- a/third_party/WebKit/Source/wtf/Deque.h
+++ b/third_party/WebKit/Source/wtf/Deque.h
@@ -113,7 +113,7 @@ public:
template <typename VisitorDispatcher> void trace(VisitorDispatcher);
static_assert(!std::is_polymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "Cannot initialize with memset if there is a vtable");
- static_assert(Allocator::isGarbageCollected || !AllowsOnlyPlacementNew<T>::value || !NeedsTracing<T>::value, "Cannot put DISALLOW_NEW_EXCEPT_PLACEMENT_NEW objects that have trace methods into an off-heap Deque");
+ static_assert(Allocator::isGarbageCollected || !AllowsOnlyPlacementNew<T>::value || !IsTraceable<T>::value, "Cannot put DISALLOW_NEW_EXCEPT_PLACEMENT_NEW objects that have trace methods into an off-heap Deque");
static_assert(Allocator::isGarbageCollected || !IsPointerToGarbageCollectedType<T>::value, "Cannot put raw pointers to garbage-collected classes into a Deque. Use HeapDeque<Member<T>> instead.");
private:
@@ -596,7 +596,7 @@ void Deque<T, inlineCapacity, Allocator>::trace(VisitorDispatcher visitor)
ASSERT(Allocator::isGarbageCollected); // Garbage collector must be enabled.
const T* bufferBegin = m_buffer.buffer();
const T* end = bufferBegin + m_end;
- if (NeedsTracingTrait<VectorTraits<T>>::value) {
+ if (IsTraceableInCollectionTrait<VectorTraits<T>>::value) {
if (m_start <= m_end) {
for (const T* bufferEntry = bufferBegin + m_start; bufferEntry != end; bufferEntry++)
Allocator::template trace<VisitorDispatcher, T, VectorTraits<T>>(visitor, *const_cast<T*>(bufferEntry));

Powered by Google App Engine
This is Rietveld 408576698