Index: Source/heap/Visitor.h |
diff --git a/Source/heap/Visitor.h b/Source/heap/Visitor.h |
index 4d52a0368166e6915a8deb84de796f9f2ac4132d..92f92de30d8dfb15c89773dc268ad408039d56d8 100644 |
--- a/Source/heap/Visitor.h |
+++ b/Source/heap/Visitor.h |
@@ -39,6 +39,7 @@ |
#include "wtf/HashMap.h" |
#include "wtf/HashSet.h" |
#include "wtf/HashTraits.h" |
+#include "wtf/LinkedHashSet.h" |
#include "wtf/ListHashSet.h" |
#include "wtf/OwnPtr.h" |
#include "wtf/RefPtr.h" |
@@ -262,6 +263,12 @@ public: |
OffHeapCollectionTraceTrait<ListHashSet<T, inlineCapacity, U> >::trace(this, hashSet); |
} |
+ template<typename T, typename U> |
+ void trace(const LinkedHashSet<T, U>& hashSet) |
+ { |
+ OffHeapCollectionTraceTrait<LinkedHashSet<T, U> >::trace(this, hashSet); |
+ } |
+ |
template<typename T, size_t N> |
void trace(const Deque<T, N>& deque) |
{ |
@@ -427,6 +434,20 @@ struct OffHeapCollectionTraceTrait<WTF::ListHashSet<T, inlineCapacity, HashFunct |
} |
}; |
+template<typename T, typename HashFunctions> |
+struct OffHeapCollectionTraceTrait<WTF::LinkedHashSet<T, HashFunctions> > { |
+ typedef WTF::LinkedHashSet<T, HashFunctions> LinkedHashSet; |
+ |
+ static void trace(Visitor* visitor, const LinkedHashSet& set) |
+ { |
+ if (set.isEmpty()) |
+ return; |
+ LinkedHashSet& iterSet = const_cast<LinkedHashSet&>(set); |
+ for (typename LinkedHashSet::iterator it = iterSet.begin(), end = iterSet.end(); it != end; ++it) |
+ visitor->trace(*it); |
+ } |
+}; |
+ |
template<typename Key, typename Value, typename HashFunctions, typename KeyTraits, typename ValueTraits> |
struct OffHeapCollectionTraceTrait<WTF::HashMap<Key, Value, HashFunctions, KeyTraits, ValueTraits, WTF::DefaultAllocator> > { |
typedef WTF::HashMap<Key, Value, HashFunctions, KeyTraits, ValueTraits, WTF::DefaultAllocator> HashMap; |