Remove 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> Review URL: https://codereview.chromium.org/184233006 git-svn-id: svn://svn.chromium.org/blink/trunk@168593 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
This diff is collapsed.
Please register or sign in to comment