Index: Source/heap/Visitor.h |
diff --git a/Source/heap/Visitor.h b/Source/heap/Visitor.h |
index 3eb5537930c93681ad28e7f02bb44e561c9a637c..7a85f45d66fce4ce52370ba89f5c4b867ae9370b 100644 |
--- a/Source/heap/Visitor.h |
+++ b/Source/heap/Visitor.h |
@@ -37,6 +37,7 @@ |
#include <wtf/HashMap.h> |
#include <wtf/HashSet.h> |
#include <wtf/HashTraits.h> |
+#include <wtf/ListHashSet.h> |
#define TRACE_GC_MARKING 0 |
#define TRACE_GC_FINALIZATION 0 |
@@ -273,10 +274,10 @@ public: |
} |
// The following visit methods are for off-heap collections. |
- template<typename T, size_t N> |
- void trace(const Vector<T, N, WTF::FastAllocator>& vector) |
+ template<typename T, size_t inlineCapacity> |
+ void trace(const Vector<T, inlineCapacity, WTF::FastAllocator>& vector) |
{ |
- CollectionVisitingTrait<Vector<T, N, WTF::FastAllocator> >::visit(this, vector); |
+ CollectionVisitingTrait<Vector<T, inlineCapacity, WTF::FastAllocator> >::visit(this, vector); |
} |
template<typename T, typename U, typename V> |
@@ -285,6 +286,12 @@ public: |
CollectionVisitingTrait<HashSet<T, WTF::FastAllocator, U, V> >::visit(this, hashSet); |
} |
+ template<typename T, size_t inlineCapacity, typename U> |
+ void trace(const ListHashSet<T, inlineCapacity, U>& hashSet) |
+ { |
+ CollectionVisitingTrait<ListHashSet<T, inlineCapacity, U> >::visit(this, hashSet); |
+ } |
+ |
template<typename T, size_t N> |
void trace(const Deque<T, N>& deque) |
{ |
@@ -410,6 +417,19 @@ struct CollectionVisitingTrait<WTF::HashSet<T, WTF::FastAllocator, HashFunctions |
} |
}; |
+template<typename T, size_t inlineCapacity, typename HashFunctions> |
+struct CollectionVisitingTrait<WTF::ListHashSet<T, inlineCapacity, HashFunctions> > { |
+ typedef WTF::ListHashSet<T, inlineCapacity, HashFunctions> ListHashSet; |
+ |
+ static void visit(Visitor* visitor, const ListHashSet& set) |
+ { |
+ if (set.isEmpty()) |
+ return; |
+ for (typename ListHashSet::const_iterator it = set.begin(), end = set.end(); it != end; ++it) |
+ visitor->trace(*it); |
+ } |
+}; |
+ |
template<typename Key, typename Value, typename HashFunctions, typename KeyTraits, typename ValueTraits> |
struct CollectionVisitingTrait<WTF::HashMap<Key, Value, WTF::FastAllocator, HashFunctions, KeyTraits, ValueTraits> > { |
typedef WTF::HashMap<Key, Value, WTF::FastAllocator, HashFunctions, KeyTraits, ValueTraits> HashMap; |