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

Issue 1814563002: wtf/CheckedArithmetic.h delegates to base/numerics/safe_math.h. (Closed)

Created:
4 years, 9 months ago by Bret
Modified:
4 years, 9 months ago
Reviewers:
haraken, Yuta Kitamura
CC:
ajuma+watch-canvas_chromium.org, blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-wtf_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, eae+blinkwatch, f(malita), gavinp+loader_chromium.org, Nate Chapin, jbroman, Justin Novosad, kinuko+watch, loading-reviews+fetch_chromium.org, Mikhail, pdr+graphicswatchlist_chromium.org, piman+watch_chromium.org, rwlbuis, Stephen Chennney, sof, tyoshino+watch_chromium.org, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

wtf/CheckedArithmetic.h delegates to base/numerics/safe_math.h. CheckedArithmetic was essentially the same functionality as safe_math but had some edge cases it did not cover (e.g. size_t). Deleted the CheckedArithmetic implementation and had it forward to safe_math, and updated its callsites to use the latter's API. Committed: https://crrev.com/1465f844b54478a027711e86011a19214d8de24d Cr-Commit-Position: refs/heads/master@{#382773} Committed: https://crrev.com/18c4dc63362c6d136985f8a6d260318d9a3c0104 Cr-Commit-Position: refs/heads/master@{#382912}

Patch Set 1 #

Total comments: 4

Patch Set 2 : no wtf:: #

Patch Set 3 : fix merge conflict #

Patch Set 4 : more careful about size_t math in ImageResource #

Patch Set 5 : revert new check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -905 lines) Patch
M third_party/WebKit/Source/core/dom/CharacterData.cpp View 1 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 2 2 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/html/ImageData.cpp View 1 3 chunks +11 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp View 1 2 3 3 chunks +5 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/filters/FEConvolveMatrix.cpp View 1 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
D third_party/WebKit/Source/wtf/CheckedArithmetic.h View 1 chunk +0 lines, -714 lines 0 comments Download
D third_party/WebKit/Source/wtf/CheckedArithmeticTest.cpp View 1 chunk +0 lines, -150 lines 0 comments Download
A + third_party/WebKit/Source/wtf/CheckedNumeric.h View 1 2 chunks +11 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/wtf/StdLibExtras.h View 1 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/wtf.gypi View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download

Messages

Total messages: 36 (18 generated)
Bret
4 years, 9 months ago (2016-03-16 22:06:52 UTC) #3
haraken
LGTM, but yutak@ might want to confirm this.
4 years, 9 months ago (2016-03-17 07:59:26 UTC) #5
Yuta Kitamura
I think this is OK. I'm slightly concerned on the performance difference, but that's something ...
4 years, 9 months ago (2016-03-17 08:19:08 UTC) #6
dcheng
drive by https://codereview.chromium.org/1814563002/diff/1/third_party/WebKit/Source/wtf/StdLibExtras.h File third_party/WebKit/Source/wtf/StdLibExtras.h (right): https://codereview.chromium.org/1814563002/diff/1/third_party/WebKit/Source/wtf/StdLibExtras.h#newcode157 third_party/WebKit/Source/wtf/StdLibExtras.h:157: return checked.ValueOrDie(); checked_cast is the //base/numerics/safe_conversions.h equivalent.
4 years, 9 months ago (2016-03-17 08:25:14 UTC) #7
Bret
https://codereview.chromium.org/1814563002/diff/1/third_party/WebKit/Source/wtf/CheckedNumeric.h File third_party/WebKit/Source/wtf/CheckedNumeric.h (right): https://codereview.chromium.org/1814563002/diff/1/third_party/WebKit/Source/wtf/CheckedNumeric.h#newcode36 third_party/WebKit/Source/wtf/CheckedNumeric.h:36: On 2016/03/17 08:19:08, Yuta Kitamura wrote: > We usually ...
4 years, 9 months ago (2016-03-18 20:48:51 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814563002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814563002/20001
4 years, 9 months ago (2016-03-18 20:49:21 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/6567) mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 9 months ago (2016-03-18 20:52:33 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814563002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814563002/40001
4 years, 9 months ago (2016-03-18 23:19:00 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/199121)
4 years, 9 months ago (2016-03-19 01:03:28 UTC) #18
Bret
On 2016/03/19 01:03:28, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 9 months ago (2016-03-22 23:26:00 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814563002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814563002/60001
4 years, 9 months ago (2016-03-22 23:26:29 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 9 months ago (2016-03-23 02:27:26 UTC) #24
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/1465f844b54478a027711e86011a19214d8de24d Cr-Commit-Position: refs/heads/master@{#382773}
4 years, 9 months ago (2016-03-23 02:28:42 UTC) #26
aberent
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/1822353002/ by aberent@chromium.org. ...
4 years, 9 months ago (2016-03-23 16:12:20 UTC) #27
Bret
On 2016/03/23 16:12:20, aberent wrote: > A revert of this CL (patchset #4 id:60001) has ...
4 years, 9 months ago (2016-03-23 17:43:02 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1814563002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1814563002/80001
4 years, 9 months ago (2016-03-23 17:43:33 UTC) #32
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 9 months ago (2016-03-23 20:24:17 UTC) #34
commit-bot: I haz the power
4 years, 9 months ago (2016-03-23 20:25:14 UTC) #36
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/18c4dc63362c6d136985f8a6d260318d9a3c0104
Cr-Commit-Position: refs/heads/master@{#382912}

Powered by Google App Engine
This is Rietveld 408576698