RESOLVED FIXED 104777
Web Inspector: Native Memory Instrumentation: simplify Sequences processing code.
https://bugs.webkit.org/show_bug.cgi?id=104777
Summary Web Inspector: Native Memory Instrumentation: simplify Sequences processing c...
Ilya Tikhonovsky
Reported 2012-12-12 01:33:16 PST
The old code uses a free template function with two template arguments and a traits struct. The function uses two template arguments, the user type and iterator type. I found that if I need an overload for a type then I should overload the free template function. It forces me to explicitly specify iterator type for the second template argument. First of all it requires too many letters. The second, I need to copy&paste such overload for all types of iterators. HashMap::const_iterator, HashSet::const_iterator, etc. Solution: the free function needs to be converted to the traits function. Patch to follow.
Attachments
Patch (8.57 KB, patch)
2012-12-12 01:35 PST, Ilya Tikhonovsky
yurys: review+
Ilya Tikhonovsky
Comment 1 2012-12-12 01:35:43 PST
Yury Semikhatsky
Comment 2 2012-12-12 01:51:33 PST
Comment on attachment 178996 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=178996&action=review > Source/WTF/ChangeLog:8 > + Drive by fix: redesign reportMemoryUsage for the sequences. Drive by? > Source/WTF/wtf/MemoryInstrumentationSequence.h:39 > +template <typename T> struct IsNotConvertibleType { IsNotConvertibleType -> NotConvertibleToInteger
Ilya Tikhonovsky
Comment 3 2012-12-12 01:54:57 PST
Note You need to log in before you can comment on or make changes to this bug.