Chromium Code Reviews| Index: third_party/WebKit/Source/wtf/HashTraits.h |
| diff --git a/third_party/WebKit/Source/wtf/HashTraits.h b/third_party/WebKit/Source/wtf/HashTraits.h |
| index 77d4ff6bc35987f584449ad72aed5c9bfcd1347a..bd8f8c9d7bc9e8c40d21d46fb4b5017a4737b31c 100644 |
| --- a/third_party/WebKit/Source/wtf/HashTraits.h |
| +++ b/third_party/WebKit/Source/wtf/HashTraits.h |
| @@ -61,9 +61,13 @@ template <typename T> struct GenericHashTraitsBase<false, T> { |
| static const unsigned minimumTableSize = 8; |
| #endif |
| + // When a hash table backing store is traced, its elements will be |
| + // traced if their class type has a trace method. However, weak-referenced |
| + // elements should not be traced then, but handled by the weak processing |
| + // phase that follows. |
| template <typename U = void> |
| - struct NeedsTracingLazily { |
|
haraken
2016/06/12 07:11:31
Nit: I'm okay with keeping the word "lazily" to ma
sof
2016/06/12 07:29:44
None other than it would fail to compile, i think.
|
| - static const bool value = NeedsTracing<T>::value; |
| + struct IsTraceableInCollection { |
| + static const bool value = IsTraceable<T>::value && !IsWeak<T>::value; |
| }; |
| // The NeedsToForbidGCOnMove flag is used to make the hash table move |
| @@ -302,8 +306,8 @@ struct KeyValuePairHashTraits : GenericHashTraits<KeyValuePair<typename KeyTrait |
| static EmptyValueType emptyValue() { return KeyValuePair<typename KeyTraits::EmptyValueType, typename ValueTraits::EmptyValueType>(KeyTraits::emptyValue(), ValueTraits::emptyValue()); } |
| template <typename U = void> |
| - struct NeedsTracingLazily { |
| - static const bool value = NeedsTracingTrait<KeyTraits>::value || NeedsTracingTrait<ValueTraits>::value; |
| + struct IsTraceableInCollection { |
| + static const bool value = IsTraceableInCollectionTrait<KeyTraits>::value || IsTraceableInCollectionTrait<ValueTraits>::value; |
| }; |
| template <typename U = void> |