Index: Source/wtf/Vector.h |
diff --git a/Source/wtf/Vector.h b/Source/wtf/Vector.h |
index 50e924d617283b71049a3e538872d106314e1f79..982c68912b935dbb594515eb43e6e10c12953a36 100644 |
--- a/Source/wtf/Vector.h |
+++ b/Source/wtf/Vector.h |
@@ -745,7 +745,7 @@ static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE; |
void reverse(); |
- void trace(typename Allocator::Visitor*); |
+ template<typename VisitorDispatcher> void trace(VisitorDispatcher); |
private: |
void expandCapacity(size_t newMinCapacity); |
@@ -1210,14 +1210,15 @@ static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE; |
// 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> |
- void Vector<T, inlineCapacity, Allocator>::trace(typename Allocator::Visitor* visitor) |
+ template<typename VisitorDispatcher> |
+ void Vector<T, inlineCapacity, Allocator>::trace(VisitorDispatcher visitor) |
{ |
ASSERT(Allocator::isGarbageCollected); // Garbage collector must be enabled. |
const T* bufferBegin = buffer(); |
const T* bufferEnd = buffer() + size(); |
if (ShouldBeTraced<VectorTraits<T> >::value) { |
for (const T* bufferEntry = bufferBegin; bufferEntry != bufferEnd; bufferEntry++) |
- Allocator::template trace<T, VectorTraits<T> >(visitor, *const_cast<T*>(bufferEntry)); |
+ Allocator::template trace<VisitorDispatcher, T, VectorTraits<T> >(visitor, *const_cast<T*>(bufferEntry)); |
} |
if (this->hasOutOfLineBuffer()) |
Allocator::markNoTracing(visitor, buffer()); |