| Index: third_party/WebKit/Source/wtf/Vector.h
|
| diff --git a/third_party/WebKit/Source/wtf/Vector.h b/third_party/WebKit/Source/wtf/Vector.h
|
| index 0dfcdab7d9370d7a93f3dff10cceb44bacd46098..9722d7eaf906fa9b3ba5615311f2c6ea71f8c43c 100644
|
| --- a/third_party/WebKit/Source/wtf/Vector.h
|
| +++ b/third_party/WebKit/Source/wtf/Vector.h
|
| @@ -355,13 +355,13 @@ public:
|
| // If the vector backing is garbage-collected and needs tracing or
|
| // finalizing, we clear out the unused slots so that the visitor or the
|
| // finalizer does not cause a problem when visiting the unused slots.
|
| - VectorUnusedSlotClearer<Allocator::isGarbageCollected && (VectorTraits<T>::needsDestruction || NeedsTracingTrait<VectorTraits<T>>::value), T>::clear(from, to);
|
| + VectorUnusedSlotClearer<Allocator::isGarbageCollected && (VectorTraits<T>::needsDestruction || IsTraceableInCollectionTrait<VectorTraits<T>>::value), T>::clear(from, to);
|
| }
|
|
|
| void checkUnusedSlots(const T* from, const T* to)
|
| {
|
| #if ENABLE(ASSERT) && !defined(ANNOTATE_CONTIGUOUS_CONTAINER)
|
| - VectorUnusedSlotClearer<Allocator::isGarbageCollected && (VectorTraits<T>::needsDestruction || NeedsTracingTrait<VectorTraits<T>>::value), T>::checkCleared(from, to);
|
| + VectorUnusedSlotClearer<Allocator::isGarbageCollected && (VectorTraits<T>::needsDestruction || IsTraceableInCollectionTrait<VectorTraits<T>>::value), T>::checkCleared(from, to);
|
| #endif
|
| }
|
|
|
| @@ -778,7 +778,7 @@ public:
|
| Vector()
|
| {
|
| 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 Vector");
|
| + 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 Vector");
|
| static_assert(Allocator::isGarbageCollected || !IsPointerToGarbageCollectedType<T>::value, "Cannot put raw pointers to garbage-collected classes into an off-heap Vector. Use HeapVector<Member<T>> instead.");
|
|
|
| ANNOTATE_NEW_BUFFER(begin(), capacity(), 0);
|
| @@ -789,7 +789,7 @@ public:
|
| : Base(size)
|
| {
|
| 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 Vector");
|
| + 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 Vector");
|
| static_assert(Allocator::isGarbageCollected || !IsPointerToGarbageCollectedType<T>::value, "Cannot put raw pointers to garbage-collected classes into an off-heap Vector. Use HeapVector<Member<T>> instead.");
|
|
|
| ANNOTATE_NEW_BUFFER(begin(), capacity(), size);
|
| @@ -1523,7 +1523,7 @@ void Vector<T, inlineCapacity, Allocator>::trace(VisitorDispatcher visitor)
|
| }
|
| const T* bufferBegin = buffer();
|
| const T* bufferEnd = buffer() + size();
|
| - if (NeedsTracingTrait<VectorTraits<T>>::value) {
|
| + if (IsTraceableInCollectionTrait<VectorTraits<T>>::value) {
|
| for (const T* bufferEntry = bufferBegin; bufferEntry != bufferEnd; bufferEntry++)
|
| Allocator::template trace<VisitorDispatcher, T, VectorTraits<T>>(visitor, *const_cast<T*>(bufferEntry));
|
| checkUnusedSlots(buffer() + size(), buffer() + capacity());
|
|
|