Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: third_party/WebKit/Source/wtf/HashTable.h

Issue 2065443002: Rename and improve "traceable" templates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment rewording Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/HashTable.h
diff --git a/third_party/WebKit/Source/wtf/HashTable.h b/third_party/WebKit/Source/wtf/HashTable.h
index 014771f50bd1e50212c6295d956dc44a7ece6f75..64c70184898b5576db459156257802f0b48bfd03 100644
--- a/third_party/WebKit/Source/wtf/HashTable.h
+++ b/third_party/WebKit/Source/wtf/HashTable.h
@@ -1019,8 +1019,8 @@ Value* HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Alloca
// polymorphic.
static_assert(!Traits::emptyValueIsZero || !std::is_polymorphic<KeyType>::value, "empty value cannot be zero for things with a vtable");
static_assert(Allocator::isGarbageCollected
- || ((!AllowsOnlyPlacementNew<KeyType>::value || !NeedsTracing<KeyType>::value)
- && (!AllowsOnlyPlacementNew<ValueType>::value || !NeedsTracing<ValueType>::value))
+ || ((!AllowsOnlyPlacementNew<KeyType>::value || !IsTraceable<KeyType>::value)
+ && (!AllowsOnlyPlacementNew<ValueType>::value || !IsTraceable<ValueType>::value))
, "Cannot put DISALLOW_NEW_EXCEPT_PLACEMENT_NEW objects that have trace methods into an off-heap HashTable");
if (Traits::emptyValueIsZero) {
@@ -1406,7 +1406,7 @@ void HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Allocato
// cases). However, it shouldn't cause any issue.
Allocator::registerWeakMembers(visitor, this, m_table, WeakProcessingHashTableHelper<Traits::weakHandlingFlag, Key, Value, Extractor, HashFunctions, Traits, KeyTraits, Allocator>::process);
}
- if (!NeedsTracingTrait<Traits>::value)
+ if (!IsTraceableInCollectionTrait<Traits>::value)
return;
if (Traits::weakHandlingFlag == WeakHandlingInCollections) {
// If we have both strong and weak pointers in the collection then

Powered by Google App Engine
This is Rietveld 408576698