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

Issue 1916193003: Change SuperFastHash signature to use size_t, not int. (Closed)

Created:
4 years, 8 months ago by scheib
Modified:
4 years, 8 months ago
Reviewers:
Nico
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change SuperFastHash signature to use size_t, not int. Move the size check and static_cast to from the generic Hash to the specific SuperFastHash wrapper. Hash uses a reasonable size_t type, but the specific SuperFastHash uses an int for size. This is leaking a mistake from third_party code into our wrapper. Client code that wants to be clear that it is using SuperFastHash specifically (not just generic Hash) should be able to do so with a size_t type. Committed: https://crrev.com/3bec18d235b327e9b18c1f7efa07c6fc46d32715 Cr-Commit-Position: refs/heads/master@{#389818}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -8 lines) Patch
M base/hash.h View 1 chunk +2 lines, -6 lines 0 comments Download
M base/hash.cc View 1 chunk +6 lines, -2 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 17 (7 generated)
scheib
This to fix casting error that was observed from https://build.chromium.org/p/chromium.win/builders/Win%20x64%20Builder%20%28dbg%29/builds/21170
4 years, 8 months ago (2016-04-26 15:07:26 UTC) #4
jam
On 2016/04/26 15:07:26, scheib wrote: > This to fix casting error that was observed from ...
4 years, 8 months ago (2016-04-26 16:27:18 UTC) #5
scheib
This to fix casting error that was observed from https://build.chromium.org/p/chromium.win/builders/Win%20x64%20Builder%20%28dbg%29/builds/21170
4 years, 8 months ago (2016-04-26 17:05:56 UTC) #7
Nico
We have 'msvs_disabled_warnings': [4267, ],' all over the place, maybe your target just needs that ...
4 years, 8 months ago (2016-04-26 17:39:41 UTC) #8
Nico
But lgtm if you want to land this.
4 years, 8 months ago (2016-04-26 17:41:03 UTC) #9
scheib
;| suppressing 4267 is a tad unfortunate. I think having the code intentionally handle this ...
4 years, 8 months ago (2016-04-26 17:58:04 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916193003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916193003/1
4 years, 8 months ago (2016-04-26 17:58:23 UTC) #12
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-26 18:03:31 UTC) #14
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/3bec18d235b327e9b18c1f7efa07c6fc46d32715 Cr-Commit-Position: refs/heads/master@{#389818}
4 years, 8 months ago (2016-04-26 18:05:12 UTC) #16
Nico
4 years, 8 months ago (2016-04-26 18:19:04 UTC) #17
Message was sent while issue was closed.
On 2016/04/26 17:58:04, scheib wrote:
> ;| suppressing 4267 is a tad unfortunate.

I don't disagree, but it's suppressed almost everywhere atm.

Powered by Google App Engine
This is Rietveld 408576698