| Index: Source/wtf/Vector.h
|
| diff --git a/Source/wtf/Vector.h b/Source/wtf/Vector.h
|
| index 7a6421bd5bc1dab05e03044328f500687a4d5c77..0036d9cbfc64ea560c2607f528db1aa7b9aa66cc 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 visitor);
|
|
|
| private:
|
| void expandCapacity(size_t newMinCapacity);
|
| @@ -1210,9 +1210,10 @@ 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.
|
| + COMPILE_ASSERT(Allocator::isGarbageCollected, GarbageCollectorMustBeEnabled);
|
| const T* bufferBegin = buffer();
|
| const T* bufferEnd = buffer() + size();
|
| if (ShouldBeTraced<VectorTraits<T> >::value) {
|
| @@ -1220,7 +1221,7 @@ static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE;
|
| Allocator::template trace<T, VectorTraits<T> >(visitor, *const_cast<T*>(bufferEntry));
|
| }
|
| if (this->hasOutOfLineBuffer())
|
| - Allocator::markNoTracing(visitor, buffer());
|
| + visitor->markNoTracing(buffer());
|
| }
|
|
|
| #if !ENABLE(OILPAN)
|
|
|