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

Issue 630503002: Align base::hash_map with C++11, part 1. (Closed)

Created:
6 years, 2 months ago by davidben
Modified:
6 years, 2 months ago
CC:
chromium-reviews, asanka, cbentzel+watch_chromium.org, tzik, benjhayden+dwatch_chromium.org, wfh+watch_chromium.org, jam, gavinp+memory_chromium.org, nhiroki, kinuko+fileapi, dsinclair+watch_chromium.org, darin-cc_chromium.org, mmenke, tfarina, mkwst+moarreviews-renderer_chromium.org, piman+watch_chromium.org, cc-bugs_chromium.org, erikwright+watch_chromium.org, markusheintz_, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@hash-2
Project:
chromium
Visibility:
Public.

Description

Align base::hash_map with C++11, part 1. C++11's std::hash provides a default hash for T* that hashes by pointer value. So does MSVC's stdext::hash_value, but not GCC's __gnu_cxx::hash (and STLPort's std::hash). To align non-MSVC with both MSVC and the standard, provide a default hash for pointers. This removes a lot of GCC-specific hash definitions. Confusingly, all three provide a default hash for const char * that hashes as C string, while not changing their equality. This CL does not change this on any platform. BUG=420242 Committed: https://crrev.com/254bd40b3f63b8d1e484a5c88a2255681ea54e45 Cr-Commit-Position: refs/heads/master@{#299217}

Patch Set 1 #

Patch Set 2 : Ugh, git #

Total comments: 4

Patch Set 3 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -196 lines) Patch
M base/containers/hash_tables.h View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M base/debug/trace_event_impl.h View 1 chunk +0 lines, -11 lines 0 comments Download
M base/memory/discardable_memory_manager.h View 1 chunk +0 lines, -12 lines 0 comments Download
M cc/resources/prioritized_resource_manager.h View 1 chunk +0 lines, -10 lines 0 comments Download
M cc/trees/layer_sorter.h View 1 chunk +0 lines, -13 lines 0 comments Download
M cc/trees/layer_tree_impl.h View 1 chunk +0 lines, -11 lines 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate.h View 1 chunk +0 lines, -11 lines 0 comments Download
M chrome/browser/profiles/profile.h View 1 chunk +0 lines, -13 lines 0 comments Download
M chrome/browser/safe_browsing/protocol_manager.h View 1 chunk +0 lines, -13 lines 0 comments Download
M content/browser/manifest/manifest_manager_host.h View 1 chunk +0 lines, -11 lines 0 comments Download
M content/child/npapi/np_channel_base.h View 1 chunk +0 lines, -29 lines 0 comments Download
M content/common/gpu/gpu_memory_manager_unittest.cc View 1 chunk +0 lines, -11 lines 0 comments Download
M content/public/browser/browser_context.h View 1 chunk +0 lines, -13 lines 0 comments Download
M gpu/command_buffer/service/async_pixel_transfer_manager.h View 1 chunk +0 lines, -11 lines 0 comments Download
M net/quic/quic_ack_notifier_manager.h View 1 chunk +0 lines, -11 lines 0 comments Download
M tools/gn/target.h View 1 chunk +0 lines, -16 lines 0 comments Download

Messages

Total messages: 20 (6 generated)
davidben
There wasn't much chatter on the thread I sent out, so I guess I'll publish ...
6 years, 2 months ago (2014-10-06 19:16:03 UTC) #2
viettrungluu
https://codereview.chromium.org/630503002/diff/20001/base/containers/hash_tables.h File base/containers/hash_tables.h (right): https://codereview.chromium.org/630503002/diff/20001/base/containers/hash_tables.h#newcode95 base/containers/hash_tables.h:95: BASE_HASH_NAMESPACE::hash<uintptr_t> h; You're already inside BASE_HASH_NAMESPACE. https://codereview.chromium.org/630503002/diff/20001/base/containers/hash_tables.h#newcode96 base/containers/hash_tables.h:96: return ...
6 years, 2 months ago (2014-10-08 17:19:45 UTC) #4
davidben
https://codereview.chromium.org/630503002/diff/20001/base/containers/hash_tables.h File base/containers/hash_tables.h (right): https://codereview.chromium.org/630503002/diff/20001/base/containers/hash_tables.h#newcode95 base/containers/hash_tables.h:95: BASE_HASH_NAMESPACE::hash<uintptr_t> h; On 2014/10/08 17:19:44, viettrungluu wrote: > You're ...
6 years, 2 months ago (2014-10-08 18:04:01 UTC) #5
viettrungluu
On 2014/10/08 18:04:01, David Benjamin wrote: > https://codereview.chromium.org/630503002/diff/20001/base/containers/hash_tables.h > File base/containers/hash_tables.h (right): > > https://codereview.chromium.org/630503002/diff/20001/base/containers/hash_tables.h#newcode95 ...
6 years, 2 months ago (2014-10-08 18:09:29 UTC) #6
danakj
LGTM
6 years, 2 months ago (2014-10-08 23:47:49 UTC) #7
davidben
Aaaand for OWNERS coverage. +sky for chrome/ +sievers for gpu/ (and content/ though we both ...
6 years, 2 months ago (2014-10-09 17:57:31 UTC) #9
no sievers
lgtm
6 years, 2 months ago (2014-10-09 18:19:46 UTC) #10
sky
LGTM
6 years, 2 months ago (2014-10-10 02:50:48 UTC) #11
brettw
GN LGTM
6 years, 2 months ago (2014-10-10 22:51:39 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/630503002/40001
6 years, 2 months ago (2014-10-10 22:52:59 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu_triggered_tests/builds/56235)
6 years, 2 months ago (2014-10-10 23:00:25 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/630503002/40001
6 years, 2 months ago (2014-10-10 23:13:06 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years, 2 months ago (2014-10-11 00:14:07 UTC) #19
commit-bot: I haz the power
6 years, 2 months ago (2014-10-11 00:14:52 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/254bd40b3f63b8d1e484a5c88a2255681ea54e45
Cr-Commit-Position: refs/heads/master@{#299217}

Powered by Google App Engine
This is Rietveld 408576698