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

Issue 2529413002: Loosen restrictions on CheckedNumeric bitwise operators (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

Loosen restrictions on CheckedNumeric bitwise operators Allow any integer types but always promote the result to unsigned. This is more consistent with how these operations are normally used. NOTRY=true Committed: https://crrev.com/b6737bb0f0b1677cb608c86bbccd0bceb3e9fbcf Cr-Commit-Position: refs/heads/master@{#434859}

Patch Set 1 #

Patch Set 2 : docs and cast #

Total comments: 2

Patch Set 3 : more tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -32 lines) Patch
M base/numerics/safe_math.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M base/numerics/safe_math_impl.h View 1 3 chunks +13 lines, -19 lines 0 comments Download
M base/numerics/safe_numerics_unittest.cc View 1 2 1 chunk +18 lines, -12 lines 0 comments Download

Messages

Total messages: 29 (16 generated)
jschuh
ptal - This is a small tweak, because it turns out these operators are way ...
4 years ago (2016-11-28 15:43:20 UTC) #4
scottmg
https://codereview.chromium.org/2529413002/diff/60001/base/numerics/safe_math_impl.h File base/numerics/safe_math_impl.h (right): https://codereview.chromium.org/2529413002/diff/60001/base/numerics/safe_math_impl.h#newcode612 base/numerics/safe_math_impl.h:612: typename ArithmeticPromotion<MAX_EXPONENT_PROMOTION, T, U>::type>::type; Sorry, I don't understand how ...
4 years ago (2016-11-28 16:37:14 UTC) #7
jschuh
https://codereview.chromium.org/2529413002/diff/60001/base/numerics/safe_math_impl.h File base/numerics/safe_math_impl.h (right): https://codereview.chromium.org/2529413002/diff/60001/base/numerics/safe_math_impl.h#newcode612 base/numerics/safe_math_impl.h:612: typename ArithmeticPromotion<MAX_EXPONENT_PROMOTION, T, U>::type>::type; On 2016/11/28 16:37:14, scottmg (slow ...
4 years ago (2016-11-28 17:54:31 UTC) #8
scottmg
lgtm
4 years ago (2016-11-28 18:02:48 UTC) #9
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/2529413002/80001
4 years ago (2016-11-28 18:12:38 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/170933) android_clang_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, ...
4 years ago (2016-11-28 20:43:15 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/2529413002/80001
4 years ago (2016-11-28 20:58:44 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, no build URL)
4 years ago (2016-11-28 22:07:26 UTC) #17
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/2529413002/80001
4 years ago (2016-11-28 22:19:33 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, no build URL)
4 years ago (2016-11-29 02:28:09 UTC) #21
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/2529413002/80001
4 years ago (2016-11-29 02:35:20 UTC) #24
commit-bot: I haz the power
Committed patchset #3 (id:80001)
4 years ago (2016-11-29 03:07:31 UTC) #27
commit-bot: I haz the power
4 years ago (2016-11-29 03:11:14 UTC) #29
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/b6737bb0f0b1677cb608c86bbccd0bceb3e9fbcf
Cr-Commit-Position: refs/heads/master@{#434859}

Powered by Google App Engine
This is Rietveld 408576698