Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Issue 1839003002: WTF: De-specialize PtrHash<T>. (Closed)

Created:
4 years, 8 months ago by Yuta Kitamura
Modified:
4 years, 8 months ago
Reviewers:
*haraken, *tzik
CC:
chromium-reviews, szager+layoutwatch_chromium.org, oilpan-reviews, Mads Ager (chromium), zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, blink-reviews-bindings_chromium.org, jchaffraix+rendering, blink-reviews, kinuko+watch, kouhei+heap_chromium.org, blink-reviews-wtf_chromium.org, Mikhail
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

WTF: De-specialize PtrHash<T>. PtrHash<T> is specialized over various smart pointer types, e.g. PtrHash<RefPtr<T>>. However, this abstraction is not necessary; there's no code requiring the specialized versions, and they are nothing more than individual class declarations. This patch gets rid of that abstraction. Additionally, hash functions for a raw pointer T* are now defined in PtrHash<T>, instead of PtrHash<T*>, in order to align with other XXXPtrHash class templates: for example, hash functions for RefPtr<T> are in RefPtrHash<T>, not in RefPtrHash<RefPtr<T>>. I think my setup is more idiomatic C++. BUG=581524 Committed: https://crrev.com/ea9e9b39e9d5501f47d4d4d17dff59601985eaf4 Cr-Commit-Position: refs/heads/master@{#383897}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix Mac compile. #

Total comments: 2

Patch Set 3 : Remove extra equal() definitions. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -71 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/api/LineLayoutItem.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/Supplementable.h View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/Handle.h View 1 2 1 chunk +21 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/wtf/HashFunctions.h View 3 chunks +52 lines, -33 lines 0 comments Download
M third_party/WebKit/Source/wtf/HashSetTest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/wtf/ListHashSetTest.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/RetainPtr.h View 1 2 chunks +16 lines, -9 lines 0 comments Download

Messages

Total messages: 21 (10 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839003002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839003002/1
4 years, 8 months ago (2016-03-29 08:25:37 UTC) #2
Yuta Kitamura
tzik, haraken: PTAL? This is mostly cosmetic. Background: I've started to realize that I need ...
4 years, 8 months ago (2016-03-29 08:32:58 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839003002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839003002/20001
4 years, 8 months ago (2016-03-29 08:34:47 UTC) #8
haraken
LGTM
4 years, 8 months ago (2016-03-29 08:43:16 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-03-29 11:45:50 UTC) #11
tzik
lgtm https://codereview.chromium.org/1839003002/diff/20001/third_party/WebKit/Source/platform/heap/Handle.h File third_party/WebKit/Source/platform/heap/Handle.h (right): https://codereview.chromium.org/1839003002/diff/20001/third_party/WebKit/Source/platform/heap/Handle.h#newcode1381 third_party/WebKit/Source/platform/heap/Handle.h:1381: static bool equal(const blink::Member<T>& a, T* b) { ...
4 years, 8 months ago (2016-03-29 12:34:04 UTC) #12
Yuta Kitamura
https://codereview.chromium.org/1839003002/diff/20001/third_party/WebKit/Source/platform/heap/Handle.h File third_party/WebKit/Source/platform/heap/Handle.h (right): https://codereview.chromium.org/1839003002/diff/20001/third_party/WebKit/Source/platform/heap/Handle.h#newcode1381 third_party/WebKit/Source/platform/heap/Handle.h:1381: static bool equal(const blink::Member<T>& a, T* b) { return ...
4 years, 8 months ago (2016-03-29 23:29:43 UTC) #13
Yuta Kitamura
https://codereview.chromium.org/1839003002/diff/20001/third_party/WebKit/Source/platform/heap/Handle.h File third_party/WebKit/Source/platform/heap/Handle.h (right): https://codereview.chromium.org/1839003002/diff/20001/third_party/WebKit/Source/platform/heap/Handle.h#newcode1381 third_party/WebKit/Source/platform/heap/Handle.h:1381: static bool equal(const blink::Member<T>& a, T* b) { return ...
4 years, 8 months ago (2016-03-29 23:29:43 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1839003002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1839003002/40001
4 years, 8 months ago (2016-03-29 23:30:45 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-03-30 01:32:54 UTC) #19
commit-bot: I haz the power
4 years, 8 months ago (2016-03-30 01:34:49 UTC) #21
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ea9e9b39e9d5501f47d4d4d17dff59601985eaf4
Cr-Commit-Position: refs/heads/master@{#383897}

Powered by Google App Engine
This is Rietveld 408576698