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

Unified Diff: Source/wtf/Deque.h

Issue 1051853003: Oilpan: like Vector<T>, restrict Deque<T> to certain part objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updated Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Deque.h
diff --git a/Source/wtf/Deque.h b/Source/wtf/Deque.h
index 9395d67a553d950add50f5b1fbec2085e2a09f75..89d4edc477b149a5817db4d5c84acb1aaa1cab46 100644
--- a/Source/wtf/Deque.h
+++ b/Source/wtf/Deque.h
@@ -225,6 +225,10 @@ namespace WTF {
: m_start(0)
, m_end(0)
{
+ static_assert(!IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "Cannot initialize with memset if there is a vtable");
+#if ENABLE(OILPAN)
+ static_assert(Allocator::isGarbageCollected || !IsAllowOnlyInlineAllocation<T>::value || !NeedsTracing<T>::value, "Cannot put ALLOW_ONLY_INLINE_ALLOCATION objects that have trace methods into an off-heap Deque");
+#endif
}
template<typename T, size_t inlineCapacity, typename Allocator>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698