Chromium Code Reviews| Index: Source/wtf/HashTable.h |
| diff --git a/Source/wtf/HashTable.h b/Source/wtf/HashTable.h |
| index 40d57616b4d1fc2e4fc315c7d71174d774f49cbb..3751f113b9fd53750e90ca9be43b1ecf2e7afdcf 100644 |
| --- a/Source/wtf/HashTable.h |
| +++ b/Source/wtf/HashTable.h |
| @@ -1256,7 +1256,14 @@ template<typename Key, typename Value, typename Extractor, typename HashFunction |
| // At this stage calling trace can make no difference |
| // (everything is already traced), but we use the |
| // return value to remove things from the collection. |
| - if (TraceInCollectionTrait<WeakHandlingInCollections, WeakPointersActWeak, ValueType, Traits>::trace(visitor, *element)) { |
| +#if ENABLE(ASSERT) |
| + visitor->setAllowTraceForHashTableWeakProcessing(true); |
|
haraken
2015/01/13 07:55:53
Add a FIXME to remove this.
BTW, do you really ne
kouhei (in TOK)
2015/01/14 02:10:05
Done.
|
| +#endif |
| + bool elementIsDead = TraceInCollectionTrait<WeakHandlingInCollections, WeakPointersActWeak, ValueType, Traits>::trace(visitor, *element); |
| +#if ENABLE(ASSERT) |
| + visitor->setAllowTraceForHashTableWeakProcessing(false); |
| +#endif |
| + if (elementIsDead) { |
| table->registerModification(); |
| HashTableType::deleteBucket(*element); // Also calls the destructor. |
| table->m_deletedCount++; |