Index: Source/wtf/HashTable.h |
diff --git a/Source/wtf/HashTable.h b/Source/wtf/HashTable.h |
index 1289ad48d6c4be60639102583a9b3161c093c0db..30c8bbd5ef55f94a0169bbea561c132d835d5fcd 100644 |
--- a/Source/wtf/HashTable.h |
+++ b/Source/wtf/HashTable.h |
@@ -280,6 +280,8 @@ namespace WTF { |
HashTable(); |
~HashTable() |
{ |
+ if (Allocator::isGarbageCollected) |
+ return; |
if (LIKELY(!m_table)) |
return; |
deallocateTable(m_table, m_tableSize); |
@@ -887,6 +889,8 @@ namespace WTF { |
template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits, typename Allocator> |
void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Allocator>::deallocateTable(ValueType* table, unsigned size) |
{ |
+ if (Allocator::isGarbageCollected) |
+ return; |
if (Traits::needsDestruction) { |
for (unsigned i = 0; i < size; ++i) { |
if (!isDeletedBucket(table[i])) |