Index: Source/wtf/Vector.h |
diff --git a/Source/wtf/Vector.h b/Source/wtf/Vector.h |
index f353c01cd4140420a5b574bca4c90a2ba1aaa8f1..c30cad423fb7673e6863d0197b63b821f8eebf8c 100644 |
--- a/Source/wtf/Vector.h |
+++ b/Source/wtf/Vector.h |
@@ -1026,6 +1026,7 @@ static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE; |
Base::allocateExpandedBuffer(newCapacity); |
ANNOTATE_NEW_BUFFER(begin(), capacity(), m_size); |
TypeOperations::move(oldBuffer, oldEnd, begin()); |
+ clearUnusedSlots(oldBuffer, oldEnd); |
ANNOTATE_DELETE_BUFFER(oldBuffer, oldCapacity, m_size); |
Base::deallocateBuffer(oldBuffer); |
} |
@@ -1066,6 +1067,7 @@ static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE; |
if (begin() != oldBuffer) { |
ANNOTATE_NEW_BUFFER(begin(), capacity(), m_size); |
TypeOperations::move(oldBuffer, oldEnd, begin()); |
+ clearUnusedSlots(oldBuffer, oldEnd); |
ANNOTATE_DELETE_BUFFER(oldBuffer, oldCapacity, m_size); |
} |
} else { |