Skip to content

Commit

Permalink
Use base::FastHash() in //ipc
Browse files Browse the repository at this point in the history
base::Hash() is deprecated and is being replaced by base::FastHash().
The output of base::FastHash() is only fixed within the lifetime of a
single process, so if the code depends on the mapping of inputs to hash
outputs not changing over time, base::PersistentHash() must be used
instead.

Bug: 1025358
Change-Id: Ib947ff8e511ec7399aaf589d9c1abcd5ef34c6d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1922951
Auto-Submit: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716697}
  • Loading branch information
zetafunction authored and Commit Bot committed Nov 19, 2019
1 parent 8c41d3e commit 5c5a652
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ipc/ipc_mojo_bootstrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ struct MessageMemoryDumpInfo {

struct MessageMemoryDumpInfoHash {
size_t operator()(const MessageMemoryDumpInfo& info) const {
return base::HashInts32(
info.id, info.profiler_tag ? base::Hash(info.profiler_tag) : 0);
return base::HashInts(
info.id, info.profiler_tag ? base::FastHash(info.profiler_tag) : 0);
}
};

Expand Down

0 comments on commit 5c5a652

Please sign in to comment.