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

Issue 1655333002: Add message sizing to basic IPC traits and struct macros. (Closed)

Created:
4 years, 10 months ago by Ken Rockot(use gerrit already)
Modified:
4 years, 10 months ago
Reviewers:
Tom Sepez, jam
CC:
chromium-reviews, darin-cc_chromium.org, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@with-pickles
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add message sizing to basic IPC traits and struct macros. BUG=577685 Committed: https://crrev.com/0457af10a70c2ecf0e0b11a54881fe129232b739 Cr-Commit-Position: refs/heads/master@{#373720}

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : fix implicit casts on msvc #

Patch Set 4 : add a test to verify congruity re base::Value #

Patch Set 5 : moar msvc #

Total comments: 6

Patch Set 6 : address comments; prototype GetSize validation #

Patch Set 7 : validate in mojo serializer #

Total comments: 1

Patch Set 8 : include ArrayHeader in size (oops!) and ensure the buffer doesn't relocate #

Unified diffs Side-by-side diffs Delta from patch set Stats (+556 lines, -15 lines) Patch
M base/files/file_path.h View 2 chunks +2 lines, -0 lines 0 comments Download
M base/files/file_path.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M base/pickle.h View 1 2 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
M base/pickle.cc View 1 2 3 4 1 chunk +33 lines, -0 lines 0 comments Download
M base/pickle_unittest.cc View 1 chunk +102 lines, -0 lines 0 comments Download
M ipc/ipc_message_macros.h View 1 chunk +5 lines, -0 lines 0 comments Download
M ipc/ipc_message_utils.h View 6 43 chunks +123 lines, -0 lines 0 comments Download
M ipc/ipc_message_utils.cc View 1 2 20 chunks +168 lines, -0 lines 0 comments Download
M ipc/ipc_message_utils_unittest.cc View 1 2 3 6 1 chunk +26 lines, -0 lines 0 comments Download
M ipc/param_traits_macros.h View 2 chunks +4 lines, -0 lines 0 comments Download
A + ipc/param_traits_size_macros.h View 1 2 3 4 5 2 chunks +12 lines, -12 lines 0 comments Download
M mojo/public/cpp/bindings/lib/native_serialization.h View 1 2 3 4 5 6 7 2 chunks +19 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/pickled_struct_blink.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/pickled_struct_blink.cc View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/pickled_struct_chromium.h View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/tests/pickled_struct_chromium.cc View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 21 (5 generated)
Ken Rockot(use gerrit already)
Follow-up to the previous CL. This adds base::PickleSizer, and defines sizing traits for all basic ...
4 years, 10 months ago (2016-02-03 20:47:28 UTC) #2
Tom Sepez
On 2016/02/03 20:47:28, Ken Rockot wrote: > Follow-up to the previous CL. This adds base::PickleSizer, ...
4 years, 10 months ago (2016-02-03 20:55:50 UTC) #4
Ken Rockot(use gerrit already)
On 2016/02/03 at 20:55:50, tsepez wrote: > On 2016/02/03 20:47:28, Ken Rockot wrote: > > ...
4 years, 10 months ago (2016-02-03 21:30:58 UTC) #5
jam
https://codereview.chromium.org/1655333002/diff/80001/base/pickle.h File base/pickle.h (right): https://codereview.chromium.org/1655333002/diff/80001/base/pickle.h#newcode114 base/pickle.h:114: // Pickle's payload without thinking too hard about the ...
4 years, 10 months ago (2016-02-03 22:47:11 UTC) #6
Ken Rockot(use gerrit already)
I updated the CL with a prototype (see ipc_message_utils.h) and test for GetSize validation, but ...
4 years, 10 months ago (2016-02-04 03:55:12 UTC) #7
Ken Rockot(use gerrit already)
On 2016/02/04 at 03:55:12, Ken Rockot wrote: > I updated the CL with a prototype ...
4 years, 10 months ago (2016-02-04 03:58:54 UTC) #8
jam
lgtm so not to slow this down doing this in mojo bindings only seems sufficient, ...
4 years, 10 months ago (2016-02-04 04:14:34 UTC) #9
Ken Rockot(use gerrit already)
On 2016/02/04 at 04:14:34, jam wrote: > lgtm so not to slow this down > ...
4 years, 10 months ago (2016-02-04 04:50:38 UTC) #10
jam
On 2016/02/04 04:50:38, Ken Rockot wrote: > On 2016/02/04 at 04:14:34, jam wrote: > > ...
4 years, 10 months ago (2016-02-04 18:33:47 UTC) #11
jam
https://codereview.chromium.org/1655333002/diff/120001/mojo/public/cpp/bindings/lib/native_serialization.h File mojo/public/cpp/bindings/lib/native_serialization.h (right): https://codereview.chromium.org/1655333002/diff/120001/mojo/public/cpp/bindings/lib/native_serialization.h#newcode58 mojo/public/cpp/bindings/lib/native_serialization.h:58: DCHECK_GE(pickle->payload_size(), size_before_write); this is checking that the payload size ...
4 years, 10 months ago (2016-02-04 18:34:01 UTC) #12
Ken Rockot(use gerrit already)
It can't unless pickle is broken. I guess the point is just to be certain ...
4 years, 10 months ago (2016-02-04 18:36:12 UTC) #13
Ken Rockot(use gerrit already)
friendly ping tsepez@
4 years, 10 months ago (2016-02-04 23:44:54 UTC) #14
Tom Sepez
lgtm
4 years, 10 months ago (2016-02-05 00:00:56 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1655333002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1655333002/140001
4 years, 10 months ago (2016-02-05 00:10:18 UTC) #18
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 10 months ago (2016-02-05 02:12:43 UTC) #19
commit-bot: I haz the power
4 years, 10 months ago (2016-02-05 02:14:11 UTC) #21
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/0457af10a70c2ecf0e0b11a54881fe129232b739
Cr-Commit-Position: refs/heads/master@{#373720}

Powered by Google App Engine
This is Rietveld 408576698