Index: third_party/WebKit/Source/wtf/LinkedHashSet.h |
diff --git a/third_party/WebKit/Source/wtf/LinkedHashSet.h b/third_party/WebKit/Source/wtf/LinkedHashSet.h |
index 65f5100a8f133fa66fb81d123c1a0c710d546375..0a2235a0eeb054af291152ea363a058e78dce483 100644 |
--- a/third_party/WebKit/Source/wtf/LinkedHashSet.h |
+++ b/third_party/WebKit/Source/wtf/LinkedHashSet.h |
@@ -598,8 +598,14 @@ class LinkedHashSetConstReverseIterator |
friend class LinkedHashSet; |
}; |
-template <typename T, typename U, typename V, typename W> |
-inline LinkedHashSet<T, U, V, W>::LinkedHashSet() {} |
+template <typename T, typename U, typename V, typename Allocator> |
+inline LinkedHashSet<T, U, V, Allocator>::LinkedHashSet() { |
+ static_assert( |
+ Allocator::isGarbageCollected || |
+ !IsPointerToGarbageCollectedType<T>::value, |
+ "Cannot put raw pointers to garbage-collected classes into " |
+ "an off-heap LinkedHashSet. Use HeapLinkedHashSet<Member<T>> instead."); |
+} |
template <typename T, typename U, typename V, typename W> |
inline LinkedHashSet<T, U, V, W>::LinkedHashSet(const LinkedHashSet& other) |