We need to be able to estimate memory footprint of any HashCountedSet.
Created attachment 166655 [details] Patch
Comment on attachment 166655 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166655&action=review > Source/WTF/wtf/MemoryInstrumentationSequence.h:58 > + SequenceMemoryInstrumentationTraits<typename Conditional<IsConvertibleToInteger<ValueType>::value, int, ValueType>::Type>::reportMemoryUsage(begin, end, info); I don't understand what is the benefit of this check (IsConvertibleToInteger)? As I understand it doesn't matter that some type is convertible. We have to filter out POD types. I'd say we have to use IsInteger here or even IsArithmatic which includes floats.
Comment on attachment 166655 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166655&action=review >> Source/WTF/wtf/MemoryInstrumentationSequence.h:58 >> + SequenceMemoryInstrumentationTraits<typename Conditional<IsConvertibleToInteger<ValueType>::value, int, ValueType>::Type>::reportMemoryUsage(begin, end, info); > > I don't understand what is the benefit of this check (IsConvertibleToInteger)? > As I understand it doesn't matter that some type is convertible. We have to filter out POD types. > I'd say we have to use IsInteger here or even IsArithmatic which includes floats. As the comment says the check is added mainly because of iterators over enum values. Like integers they cannot have methods and would cause compilation errors. Neither IsInterger nor IsArithmetic would would return true for enum so they are not an option.
lgtm
Committed r130253: <http://trac.webkit.org/changeset/130253>