From 5c5a6524e216b313edca95cb21412b4b298d93b0 Mon Sep 17 00:00:00 2001 From: Daniel Cheng Date: Tue, 19 Nov 2019 18:03:36 +0000 Subject: [PATCH] Use base::FastHash() in //ipc 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 Reviewed-by: Ken Rockot Commit-Queue: Daniel Cheng Cr-Commit-Position: refs/heads/master@{#716697} --- ipc/ipc_mojo_bootstrap.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipc/ipc_mojo_bootstrap.cc b/ipc/ipc_mojo_bootstrap.cc index 47cd62ef9c37f5..c86fcca7c91aa5 100644 --- a/ipc/ipc_mojo_bootstrap.cc +++ b/ipc/ipc_mojo_bootstrap.cc @@ -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); } };