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

Issue 2529913002: Support overriding the CheckedNumeric value extraction functions (Closed)

Created:
4 years ago by jschuh
Modified:
4 years ago
Reviewers:
scottmg
CC:
chromium-reviews, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support overriding the CheckedNumeric value extraction functions This adds support for explicit return types and makes the failure handler overridable for consistency with the cast functions. Most importantly, this CL is the first step in fixing the silent truncations we have on extracting the values from CheckedNumeric. BUG=668713 Committed: https://crrev.com/224f1d7c944d05d5d0a918e7f1d79b49dc55a283 Cr-Commit-Position: refs/heads/master@{#434544}

Patch Set 1 #

Patch Set 2 : refactor + tests + docs #

Patch Set 3 : nits #

Total comments: 4

Patch Set 4 : tweaks and comment fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -9 lines) Patch
M base/numerics/safe_math.h View 1 2 3 1 chunk +33 lines, -8 lines 0 comments Download
M base/numerics/safe_numerics_unittest.cc View 1 2 3 4 chunks +35 lines, -1 line 0 comments Download

Messages

Total messages: 20 (12 generated)
scottmg
https://codereview.chromium.org/2529913002/diff/40001/base/numerics/safe_math.h File base/numerics/safe_math.h (right): https://codereview.chromium.org/2529913002/diff/40001/base/numerics/safe_math.h#newcode121 base/numerics/safe_math.h:121: // parameter, which will trigger a CHECK if the ...
4 years ago (2016-11-24 20:23:37 UTC) #6
jschuh
I created a bug that better explains the types of silent truncations I'm working towards ...
4 years ago (2016-11-25 14:56:39 UTC) #8
scottmg
lgtm
4 years ago (2016-11-25 17:01:55 UTC) #11
scottmg
On 2016/11/25 14:56:39, jschuh (very slow) wrote: > I created a bug that better explains ...
4 years ago (2016-11-25 17:16:17 UTC) #12
jschuh
On 2016/11/25 17:16:17, scottmg (slow on 25nov) wrote: > On 2016/11/25 14:56:39, jschuh (very slow) ...
4 years ago (2016-11-25 17:34:58 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2529913002/60001
4 years ago (2016-11-25 17:39:18 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-11-25 20:09:16 UTC) #18
commit-bot: I haz the power
4 years ago (2016-11-25 20:10:39 UTC) #20
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/224f1d7c944d05d5d0a918e7f1d79b49dc55a283
Cr-Commit-Position: refs/heads/master@{#434544}

Powered by Google App Engine
This is Rietveld 408576698