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

Unified Diff: Source/wtf/Deque.h

Issue 828453003: Revert of Templatize visitor arguments for TraceTrait mark and trace methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « Source/platform/heap/Visitor.h ('k') | Source/wtf/HashTable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Deque.h
diff --git a/Source/wtf/Deque.h b/Source/wtf/Deque.h
index 1073dee5746c80843f23524145830d6d5ba2f1e8..b0ab0c4260a20d6ab0759419908300b08f628d54 100644
--- a/Source/wtf/Deque.h
+++ b/Source/wtf/Deque.h
@@ -112,7 +112,7 @@
template<typename Predicate>
iterator findIf(Predicate&);
- template<typename VisitorDispatcher> void trace(VisitorDispatcher);
+ void trace(typename Allocator::Visitor*);
private:
friend class DequeIteratorBase<T, inlineCapacity, Allocator>;
@@ -520,8 +520,7 @@
// This is only called if the allocator is a HeapAllocator. It is used when
// visiting during a tracing GC.
template<typename T, size_t inlineCapacity, typename Allocator>
- template<typename VisitorDispatcher>
- void Deque<T, inlineCapacity, Allocator>::trace(VisitorDispatcher visitor)
+ void Deque<T, inlineCapacity, Allocator>::trace(typename Allocator::Visitor* visitor)
{
ASSERT(Allocator::isGarbageCollected); // Garbage collector must be enabled.
const T* bufferBegin = m_buffer.buffer();
@@ -529,13 +528,13 @@
if (ShouldBeTraced<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));
+ Allocator::template trace<T, VectorTraits<T> >(visitor, *const_cast<T*>(bufferEntry));
} else {
for (const T* bufferEntry = bufferBegin; bufferEntry != end; bufferEntry++)
- Allocator::template trace<VisitorDispatcher, T, VectorTraits<T> >(visitor, *const_cast<T*>(bufferEntry));
+ Allocator::template trace<T, VectorTraits<T> >(visitor, *const_cast<T*>(bufferEntry));
const T* bufferEnd = m_buffer.buffer() + m_buffer.capacity();
for (const T* bufferEntry = bufferBegin + m_start; bufferEntry != bufferEnd; bufferEntry++)
- Allocator::template trace<VisitorDispatcher, T, VectorTraits<T> >(visitor, *const_cast<T*>(bufferEntry));
+ Allocator::template trace<T, VectorTraits<T> >(visitor, *const_cast<T*>(bufferEntry));
}
}
if (m_buffer.hasOutOfLineBuffer())
« no previous file with comments | « Source/platform/heap/Visitor.h ('k') | Source/wtf/HashTable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698