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

Issue 1481403005: Fix size_t truncations in net for 64-bit VS 2015 (Closed)

Created:
5 years ago by brucedawson
Modified:
5 years ago
Reviewers:
Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org, mmenke
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix size_t truncations in net for 64-bit VS 2015 These changes are enough to get the net portions of Chromium building with VS 2015 in 64-bit gn builds. The changes are all to fix warnings about truncation from size_t to smaller types. A mixture of static_cast and checked_cast was used depending on whether the truncation could be proved correct and whether the code was in a test. R=rsleevi@chromium.org BUG=440500 Committed: https://crrev.com/ef12824d24aba9469533cb6256eccded3297e94d Cr-Commit-Position: refs/heads/master@{#362345}

Patch Set 1 #

Total comments: 3

Patch Set 2 : CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -8 lines) Patch
M net/dns/dns_test_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/congestion_control/tcp_loss_algorithm_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/congestion_control/time_loss_algorithm_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/quic_connection_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/server/web_socket_encoder.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M net/socket/socks5_client_socket_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (6 generated)
brucedawson
PTAL. Fixing the truncation warnings seems better than suppressing them in the .gn files, and ...
5 years ago (2015-12-01 01:05:06 UTC) #1
Ryan Sleevi
LGTM % nit Also, updated description, which originally said "in webkit", to be "in net" ...
5 years ago (2015-12-01 01:25:58 UTC) #4
brucedawson
Thanks for the description catch/fix. Thoughts on why static over checked? https://codereview.chromium.org/1481403005/diff/1/net/socket/socks5_client_socket_unittest.cc File net/socket/socks5_client_socket_unittest.cc (right): ...
5 years ago (2015-12-01 01:33:46 UTC) #5
Ryan Sleevi
https://codereview.chromium.org/1481403005/diff/1/net/socket/socks5_client_socket_unittest.cc File net/socket/socks5_client_socket_unittest.cc (right): https://codereview.chromium.org/1481403005/diff/1/net/socket/socks5_client_socket_unittest.cc#newcode197 net/socket/socks5_client_socket_unittest.cc:197: request.push_back(base::checked_cast<char>(hostname.size())); On 2015/12/01 01:33:45, brucedawson wrote: > On 2015/12/01 ...
5 years ago (2015-12-01 01:44:17 UTC) #6
brucedawson
> Because line 188 makes it 'obviously correct', and you seemed to omit it for ...
5 years ago (2015-12-01 01:54:57 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1481403005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1481403005/20001
5 years ago (2015-12-01 01:56:50 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years ago (2015-12-01 04:26:44 UTC) #12
commit-bot: I haz the power
5 years ago (2015-12-01 04:28:14 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ef12824d24aba9469533cb6256eccded3297e94d
Cr-Commit-Position: refs/heads/master@{#362345}

Powered by Google App Engine
This is Rietveld 408576698