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

Issue 2686503004: Add IPC ParamTraits for c-style arrays (Closed)

Created:
3 years, 10 months ago by ericrk
Modified:
3 years, 10 months ago
Reviewers:
Tom Sepez, dcheng
CC:
chromium-reviews, jam, cc-bugs_chromium.org, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add IPC ParamTraits for c-style arrays Currently, we don't have generic ParamTraits for c-style arrays (as we do for vectors). This leads to a bit of copy-pasted code for each type which sends a c-style array over IPC. This change adds ParamTraits, allowing c-style array members to be easily added via the IPC_STRUCT_TRAITS_MEMBER macro. R=dcheng@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2686503004 Cr-Commit-Position: refs/heads/master@{#449650} Committed: https://chromium.googlesource.com/chromium/src/+/b5de4603585dba1e41900cbc5dc3fd4a65d200ff

Patch Set 1 #

Patch Set 2 : Fix comparison issue #

Total comments: 4

Patch Set 3 : feedback #

Total comments: 4

Patch Set 4 : feedback #

Total comments: 5

Patch Set 5 : feedback #

Total comments: 3

Patch Set 6 : nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -145 lines) Patch
M cc/ipc/cc_param_traits.h View 1 chunk +0 lines, -22 lines 0 comments Download
M cc/ipc/cc_param_traits.cc View 1 chunk +0 lines, -78 lines 0 comments Download
M cc/ipc/cc_param_traits_macros.h View 2 chunks +8 lines, -0 lines 0 comments Download
M ipc/ipc_message_utils.h View 1 2 3 4 5 1 chunk +31 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 chunk +4 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_param_traits.h View 1 chunk +0 lines, -11 lines 0 comments Download
M ppapi/proxy/ppapi_param_traits.cc View 1 chunk +0 lines, -34 lines 0 comments Download

Messages

Total messages: 39 (20 generated)
ericrk
While converting the std::vector to a plain per your comment on crrev.com/2654993004, I realized that ...
3 years, 10 months ago (2017-02-07 21:38:07 UTC) #2
dcheng
https://codereview.chromium.org/2686503004/diff/20001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2686503004/diff/20001/ipc/ipc_message_utils.h#newcode314 ipc/ipc_message_utils.h:314: GetParamSize(sizer, static_cast<int>(Size)); Let's use strict_cast instead of static_cast throughout. ...
3 years, 10 months ago (2017-02-08 00:13:37 UTC) #7
ericrk
https://codereview.chromium.org/2686503004/diff/20001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2686503004/diff/20001/ipc/ipc_message_utils.h#newcode314 ipc/ipc_message_utils.h:314: GetParamSize(sizer, static_cast<int>(Size)); On 2017/02/08 00:13:37, dcheng wrote: > Let's ...
3 years, 10 months ago (2017-02-08 18:57:49 UTC) #9
dcheng
LGTM Btw, I talked with jschuh@ and checked_cast should work here (it's a compile-time check ...
3 years, 10 months ago (2017-02-08 19:21:11 UTC) #10
vmpstr
https://codereview.chromium.org/2686503004/diff/60001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2686503004/diff/60001/ipc/ipc_message_utils.h#newcode343 ipc/ipc_message_utils.h:343: for (size_t i = 0; i < Size; ++i) ...
3 years, 10 months ago (2017-02-08 20:06:11 UTC) #11
ericrk
https://codereview.chromium.org/2686503004/diff/60001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2686503004/diff/60001/ipc/ipc_message_utils.h#newcode333 ipc/ipc_message_utils.h:333: // For a fixed size array, a size mismath ...
3 years, 10 months ago (2017-02-08 21:07:15 UTC) #13
ericrk
+tsepez for ipc/ owners. Thanks!
3 years, 10 months ago (2017-02-08 21:08:09 UTC) #15
Tom Sepez
https://codereview.chromium.org/2686503004/diff/100001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2686503004/diff/100001/ipc/ipc_message_utils.h#newcode314 ipc/ipc_message_utils.h:314: GetParamSize(sizer, base::checked_cast<int>(Size)); Why are we passing the size over ...
3 years, 10 months ago (2017-02-09 17:14:37 UTC) #20
Tom Sepez
https://codereview.chromium.org/2686503004/diff/100001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2686503004/diff/100001/ipc/ipc_message_utils.h#newcode320 ipc/ipc_message_utils.h:320: for (size_t i = 0; i < Size; i++) ...
3 years, 10 months ago (2017-02-09 17:17:11 UTC) #21
ericrk
thanks for the feedback. https://codereview.chromium.org/2686503004/diff/100001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2686503004/diff/100001/ipc/ipc_message_utils.h#newcode314 ipc/ipc_message_utils.h:314: GetParamSize(sizer, base::checked_cast<int>(Size)); On 2017/02/09 17:14:37, ...
3 years, 10 months ago (2017-02-09 22:02:08 UTC) #22
Tom Sepez
lgtm
3 years, 10 months ago (2017-02-09 22:28:52 UTC) #23
Tom Sepez
https://codereview.chromium.org/2686503004/diff/120001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2686503004/diff/120001/ipc/ipc_message_utils.h#newcode332 ipc/ipc_message_utils.h:332: for (size_t i = 0; i < Size; ++i) ...
3 years, 10 months ago (2017-02-09 22:39:07 UTC) #24
ericrk
https://codereview.chromium.org/2686503004/diff/120001/ipc/ipc_message_utils.h File ipc/ipc_message_utils.h (right): https://codereview.chromium.org/2686503004/diff/120001/ipc/ipc_message_utils.h#newcode332 ipc/ipc_message_utils.h:332: for (size_t i = 0; i < Size; ++i) ...
3 years, 10 months ago (2017-02-10 00:15:28 UTC) #25
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/2686503004/140001
3 years, 10 months ago (2017-02-10 00:16:38 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/363834)
3 years, 10 months ago (2017-02-10 01:06:33 UTC) #30
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/2686503004/140001
3 years, 10 months ago (2017-02-10 01:32:50 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_TIMED_OUT, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/387499)
3 years, 10 months ago (2017-02-10 08:26:19 UTC) #34
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/2686503004/140001
3 years, 10 months ago (2017-02-10 16:45:18 UTC) #36
commit-bot: I haz the power
3 years, 10 months ago (2017-02-10 17:50:18 UTC) #39
Message was sent while issue was closed.
Committed patchset #6 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/b5de4603585dba1e41900cbc5dc3...

Powered by Google App Engine
This is Rietveld 408576698