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

Unified Diff: Source/wtf/Vector.h

Issue 1086413003: Oilpan: HeapVectorBacking should call destructors for its elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add test comment Created 5 years, 8 months 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/wtf/Deque.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « Source/wtf/Deque.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698