DescriptionRemove RefPtrHashMap
The recently added 'HashTraits::PeekInType' type allows us to remove
HashMap<RefPtr..> template specialization without loosing the efficiency
and without bringing any significant changes and complexity to the HashMap
class.
To get rid of 'RefPtrHashMap' a new 'RefPtrValuePeeker' type was created
and used as 'HashTraits::PeekInType' for RefPtr. The 'RefPtrValuePeeker'
class can be constructed either from RefPtr, PassRefPtr or a plain pointer,
then it behaves like a plain pointer itself within HashTable methods.
The proposed change brings the following benefits:
1) Removes tons of duplicated code
2) Allows avoiding ref-count churn also at HashSet<RefPtr>
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168593
Patch Set 1 #
Messages
Total messages: 8 (0 generated)
|