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

Issue 1154393003: cc: Use CheckedNumeric for resource size calculations. (Closed)

Created:
5 years, 6 months ago by vmpstr
Modified:
5 years, 6 months ago
Reviewers:
danakj, jschuh
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Use CheckedNumeric for resource size calculations. This patch uses CheckedNumeric for size calculations that can overflow in resources. R=danakj, jschuh BUG=495867 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/93a24d4dffd492f6ea885fb1280b3386567ae83b Cr-Commit-Position: refs/heads/master@{#333160}

Patch Set 1 #

Total comments: 2

Patch Set 2 : update #

Total comments: 5

Patch Set 3 : update #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Patch Set 6 : #

Total comments: 2

Patch Set 7 : #

Patch Set 8 : BUILD.gn #

Patch Set 9 : initialize var #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -59 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M cc/cc.gyp View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M cc/raster/pixel_buffer_tile_task_worker_pool.cc View 1 2 3 chunks +12 lines, -3 lines 0 comments Download
M cc/raster/tile_task_worker_pool_unittest.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M cc/resources/prioritized_resource.cc View 1 2 chunks +6 lines, -2 lines 0 comments Download
M cc/resources/prioritized_resource_manager.cc View 1 2 3 4 5 4 chunks +7 lines, -5 lines 0 comments Download
M cc/resources/prioritized_resource_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/resource.h View 1 2 3 4 5 6 7 8 3 chunks +30 lines, -7 lines 0 comments Download
M cc/resources/resource.cc View 1 2 3 1 chunk +0 lines, -17 lines 0 comments Download
M cc/resources/resource_pool.cc View 1 2 3 4 5 chunks +13 lines, -6 lines 0 comments Download
M cc/resources/resource_provider.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M cc/resources/scoped_resource_unittest.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M cc/tiles/tile.cc View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M cc/tiles/tile_manager.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M cc/tiles/tile_manager_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 2 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 23 (8 generated)
danakj
https://codereview.chromium.org/1154393003/diff/1/cc/resources/resource.h File cc/resources/resource.h (right): https://codereview.chromium.org/1154393003/diff/1/cc/resources/resource.h#newcode35 cc/resources/resource.h:35: return result.ValueOrDie(); This would work, but looking at the ...
5 years, 6 months ago (2015-06-04 19:02:38 UTC) #1
vmpstr
PTAL https://codereview.chromium.org/1154393003/diff/20001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/1154393003/diff/20001/cc/trees/layer_tree_host.cc#newcode936 cc/trees/layer_tree_host.cc:936: CHECK(Resource::VerifySizeInBytes(render_surface->content_rect().size(), I wasn't sure about this function, so ...
5 years, 6 months ago (2015-06-04 20:53:00 UTC) #2
danakj
https://codereview.chromium.org/1154393003/diff/20001/cc/resources/resource.h File cc/resources/resource.h (right): https://codereview.chromium.org/1154393003/diff/20001/cc/resources/resource.h#newcode26 cc/resources/resource.h:26: size_t bytes() const; we should remove this function. https://codereview.chromium.org/1154393003/diff/20001/cc/resources/resource.h#newcode31 ...
5 years, 6 months ago (2015-06-04 20:58:44 UTC) #3
danakj
https://codereview.chromium.org/1154393003/diff/60001/cc/resources/resource.h File cc/resources/resource.h (right): https://codereview.chromium.org/1154393003/diff/60001/cc/resources/resource.h#newcode47 cc/resources/resource.h:47: *bytes = value / 8; Eh, you're adding this ...
5 years, 6 months ago (2015-06-04 22:43:49 UTC) #4
vmpstr
PTAL https://codereview.chromium.org/1154393003/diff/60001/cc/resources/resource.h File cc/resources/resource.h (right): https://codereview.chromium.org/1154393003/diff/60001/cc/resources/resource.h#newcode47 cc/resources/resource.h:47: *bytes = value / 8; On 2015/06/04 22:43:49, ...
5 years, 6 months ago (2015-06-04 23:17:30 UTC) #5
danakj
LGTM https://codereview.chromium.org/1154393003/diff/100001/cc/resources/resource.h File cc/resources/resource.h (right): https://codereview.chromium.org/1154393003/diff/100001/cc/resources/resource.h#newcode55 cc/resources/resource.h:55: if (size.IsEmpty()) is this doing anything useful?
5 years, 6 months ago (2015-06-05 00:32:37 UTC) #6
jschuh
lgtm. thanks for taking care of this.
5 years, 6 months ago (2015-06-05 16:24:31 UTC) #7
vmpstr
https://codereview.chromium.org/1154393003/diff/100001/cc/resources/resource.h File cc/resources/resource.h (right): https://codereview.chromium.org/1154393003/diff/100001/cc/resources/resource.h#newcode55 cc/resources/resource.h:55: if (size.IsEmpty()) On 2015/06/05 00:32:37, danakj wrote: > is ...
5 years, 6 months ago (2015-06-05 19:08:00 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1154393003/120001
5 years, 6 months ago (2015-06-05 19:09:29 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_dbg/builds/78597) linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 6 months ago (2015-06-05 19:22:24 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1154393003/140001
5 years, 6 months ago (2015-06-05 19:34:28 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/14637)
5 years, 6 months ago (2015-06-05 20:43:08 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1154393003/160001
5 years, 6 months ago (2015-06-05 21:10:45 UTC) #21
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 6 months ago (2015-06-05 22:39:54 UTC) #22
commit-bot: I haz the power
5 years, 6 months ago (2015-06-05 22:40:59 UTC) #23
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/93a24d4dffd492f6ea885fb1280b3386567ae83b
Cr-Commit-Position: refs/heads/master@{#333160}

Powered by Google App Engine
This is Rietveld 408576698