Index: third_party/WebKit/Source/wtf/ListHashSet.h |
diff --git a/third_party/WebKit/Source/wtf/ListHashSet.h b/third_party/WebKit/Source/wtf/ListHashSet.h |
index c939359fe0d5e68b8ff1a3beb8e001dd22d0b083..85228616237bf1fbc5b90bb72822cb3e0e7ca76b 100644 |
--- a/third_party/WebKit/Source/wtf/ListHashSet.h |
+++ b/third_party/WebKit/Source/wtf/ListHashSet.h |
@@ -733,9 +733,15 @@ struct ListHashSetTranslator { |
} |
}; |
-template <typename T, size_t inlineCapacity, typename U, typename V> |
-inline ListHashSet<T, inlineCapacity, U, V>::ListHashSet() |
- : m_head(nullptr), m_tail(nullptr) {} |
+template <typename T, size_t inlineCapacity, typename U, typename Allocator> |
+inline ListHashSet<T, inlineCapacity, U, Allocator>::ListHashSet() |
+ : m_head(nullptr), m_tail(nullptr) { |
+ static_assert( |
+ Allocator::isGarbageCollected || |
+ !IsPointerToGarbageCollectedType<T>::value, |
+ "Cannot put raw pointers to garbage-collected classes into " |
+ "an off-heap ListHashSet. Use HeapListHashSet<Member<T>> instead."); |
+} |
template <typename T, size_t inlineCapacity, typename U, typename V> |
inline ListHashSet<T, inlineCapacity, U, V>::ListHashSet( |