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

Unified Diff: third_party/WebKit/Source/wtf/Vector.h

Issue 1410223006: Zero-initialize persistent heap vector inline backing buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for unit test, handle ANNOTATE_CONTIGUOUS_CONTAINER's non-support of inline buffers Created 5 years, 2 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 | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4209f95160ac04812e9aa4992bb39e39986ec73c..fa94d722d61bb54484d856e54fbbf04bb510d43b 100644
--- a/third_party/WebKit/Source/wtf/Vector.h
+++ b/third_party/WebKit/Source/wtf/Vector.h
@@ -151,7 +151,7 @@ struct VectorMover<false, T> {
}
}
}
- static void swap(T* src, T* srcEnd, T* dst)
+ static void swap(T* src, T* srcEnd, T* dst)
{
std::swap_ranges(src, srcEnd, dst);
}
@@ -287,7 +287,7 @@ struct VectorTypeOperations {
{
VectorCopier<VectorTraits<T>::canCopyWithMemcpy, T>::uninitializedCopy(src, srcEnd, dst);
}
-
+
static void uninitializedFill(T* dst, T* dstEnd, const T& val)
{
VectorFiller<VectorTraits<T>::canFillWithMemset, T>::uninitializedFill(dst, dstEnd, val);
@@ -786,6 +786,10 @@ public:
template <typename VisitorDispatcher> void trace(VisitorDispatcher);
+protected:
+ using Base::checkUnusedSlots;
+ using Base::clearUnusedSlots;
+
private:
void expandCapacity(size_t newMinCapacity);
const T* expandCapacity(size_t newMinCapacity, const T*);
@@ -799,8 +803,6 @@ private:
using Base::swapVectorBuffer;
using Base::allocateBuffer;
using Base::allocationSize;
- using Base::clearUnusedSlots;
- using Base::checkUnusedSlots;
};
template <typename T, size_t inlineCapacity, typename Allocator>
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698