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

Issue 1286253002: IPC: Add attachment brokering support to the message header. (Closed)

Created:
5 years, 4 months ago by erikchen
Modified:
5 years, 4 months ago
Reviewers:
Tom Sepez, Nico
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

IPC: Add attachment brokering support to the message header. Message dispatch happens before message translation, and message dispatch requires that all brokered attachments have been received. This means that attachment brokering needs to function without message translation. This is accomplished by modifying the message header to include a new field num_brokered_attachments, and writing the attachment ids into the IPC Channel immediately following the pickled message itself. AttachmentBrokerPrivilegedWinUnittest was expanded to test ChannelReader in the receiving process. It is now a fully functional end-to-end test of attachment brokering. BUG=493414 Committed: https://crrev.com/e8e4f4fa67ee9db6c2910020ef49318e5df68481 Cr-Commit-Position: refs/heads/master@{#344389}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : Fix compile errors. #

Patch Set 8 : Ifdefs. #

Patch Set 9 : More compile errors. #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : Remove preprocessor conditionals. #

Patch Set 14 : Fix tests. #

Patch Set 15 : Fix more #ifs #

Total comments: 22

Patch Set 16 : Comments from tsepez. #

Patch Set 17 : Use void* buffer. #

Patch Set 18 : Fix Windows compile errors. #

Total comments: 2

Patch Set 19 : Comments from tsepez. #

Patch Set 20 : Compile error. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+559 lines, -187 lines) Patch
M ipc/BUILD.gn View 1 2 3 5 2 chunks +5 lines, -0 lines 0 comments Download
M ipc/attachment_broker_privileged_win_unittest.cc View 1 2 3 4 5 6 7 8 13 chunks +154 lines, -59 lines 0 comments Download
M ipc/brokerable_attachment.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +16 lines, -11 lines 0 comments Download
M ipc/brokerable_attachment.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +39 lines, -21 lines 0 comments Download
M ipc/handle_attachment_win.h View 1 5 1 chunk +0 lines, -1 line 0 comments Download
M ipc/handle_attachment_win.cc View 1 5 2 chunks +2 lines, -15 lines 0 comments Download
M ipc/handle_win.h View 1 5 1 chunk +2 lines, -0 lines 0 comments Download
M ipc/handle_win.cc View 1 5 1 chunk +2 lines, -0 lines 0 comments Download
M ipc/ipc.gyp View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ipc/ipc.gypi View 5 1 chunk +2 lines, -0 lines 0 comments Download
M ipc/ipc_channel.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +26 lines, -6 lines 0 comments Download
M ipc/ipc_channel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +22 lines, -0 lines 0 comments Download
M ipc/ipc_channel_posix.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M ipc/ipc_channel_reader.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ipc/ipc_channel_reader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +21 lines, -11 lines 0 comments Download
M ipc/ipc_channel_reader_unittest.cc View 1 5 chunks +9 lines, -16 lines 0 comments Download
M ipc/ipc_channel_win.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_channel_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +34 lines, -16 lines 0 comments Download
M ipc/ipc_message.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +48 lines, -5 lines 0 comments Download
M ipc/ipc_message.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +88 lines, -0 lines 0 comments Download
M ipc/ipc_message_attachment_set.h View 1 2 3 7 8 9 10 11 12 1 chunk +5 lines, -2 lines 0 comments Download
M ipc/ipc_message_attachment_set.cc View 1 2 3 7 8 9 10 11 12 1 chunk +17 lines, -9 lines 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M ipc/ipc_message_utils.cc View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
A + ipc/ipc_test_message_generator.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A + ipc/ipc_test_message_generator.cc View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download
A ipc/ipc_test_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +14 lines, -0 lines 0 comments Download
A ipc/placeholder_brokerable_attachment.h View 1 1 chunk +28 lines, -0 lines 0 comments Download
A + ipc/placeholder_brokerable_attachment.cc View 1 chunk +4 lines, -5 lines 0 comments Download

Messages

Total messages: 67 (32 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/100001
5 years, 4 months ago (2015-08-13 01:31:09 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/84401)
5 years, 4 months ago (2015-08-13 01:46:25 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/100001
5 years, 4 months ago (2015-08-13 08:05:13 UTC) #6
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 4 months ago (2015-08-13 08:05:15 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/160001
5 years, 4 months ago (2015-08-13 18:35:09 UTC) #11
commit-bot: I haz the power
Dry run: 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/97926)
5 years, 4 months ago (2015-08-13 18:51:52 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/200001
5 years, 4 months ago (2015-08-13 20:58:51 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/90366)
5 years, 4 months ago (2015-08-13 21:26:14 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/220001
5 years, 4 months ago (2015-08-13 21:47:09 UTC) #19
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 4 months ago (2015-08-13 21:47:10 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/220001
5 years, 4 months ago (2015-08-13 21:51:21 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/240001
5 years, 4 months ago (2015-08-13 22:01:34 UTC) #25
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/49993)
5 years, 4 months ago (2015-08-13 22:31:31 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/260001
5 years, 4 months ago (2015-08-13 22:51:27 UTC) #29
commit-bot: I haz the power
Dry run: 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/98077)
5 years, 4 months ago (2015-08-13 23:30:42 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/280001
5 years, 4 months ago (2015-08-14 01:07:14 UTC) #33
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/98976)
5 years, 4 months ago (2015-08-14 02:07:43 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/300001
5 years, 4 months ago (2015-08-14 18:25:32 UTC) #37
erikchen
tsepez: Please review. The only try-bot failure is unrelated: """ Failure: Could not find image ...
5 years, 4 months ago (2015-08-14 20:20:21 UTC) #39
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-14 21:14:30 UTC) #41
Tom Sepez
I'm a little leery of modifying the header; got other ideas? https://codereview.chromium.org/1286253002/diff/300001/ipc/brokerable_attachment.cc File ipc/brokerable_attachment.cc (right): ...
5 years, 4 months ago (2015-08-17 18:29:39 UTC) #42
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/360001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/360001
5 years, 4 months ago (2015-08-18 00:33:40 UTC) #45
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/71541)
5 years, 4 months ago (2015-08-18 01:08:20 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/380001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/380001
5 years, 4 months ago (2015-08-18 01:34:08 UTC) #49
commit-bot: I haz the power
Dry run: 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/40734)
5 years, 4 months ago (2015-08-18 02:19:49 UTC) #51
erikchen
tsepez: PTAL https://codereview.chromium.org/1286253002/diff/300001/ipc/brokerable_attachment.cc File ipc/brokerable_attachment.cc (right): https://codereview.chromium.org/1286253002/diff/300001/ipc/brokerable_attachment.cc#newcode25 ipc/brokerable_attachment.cc:25: return id; On 2015/08/17 18:29:39, Tom Sepez ...
5 years, 4 months ago (2015-08-18 05:59:46 UTC) #52
Tom Sepez
lgtm Ok, I think this works. https://codereview.chromium.org/1286253002/diff/380001/ipc/ipc_test_messages.h File ipc/ipc_test_messages.h (right): https://codereview.chromium.org/1286253002/diff/380001/ipc/ipc_test_messages.h#newcode7 ipc/ipc_test_messages.h:7: #if defined(OS_WIN) nit: ...
5 years, 4 months ago (2015-08-18 15:18:56 UTC) #53
erikchen
https://codereview.chromium.org/1286253002/diff/380001/ipc/ipc_test_messages.h File ipc/ipc_test_messages.h (right): https://codereview.chromium.org/1286253002/diff/380001/ipc/ipc_test_messages.h#newcode7 ipc/ipc_test_messages.h:7: #if defined(OS_WIN) On 2015/08/18 15:18:56, Tom Sepez (Out Aug ...
5 years, 4 months ago (2015-08-19 17:47:55 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/400001
5 years, 4 months ago (2015-08-19 17:48:20 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/92620)
5 years, 4 months ago (2015-08-19 18:38:56 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1286253002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1286253002/420001
5 years, 4 months ago (2015-08-19 22:22:28 UTC) #62
commit-bot: I haz the power
Committed patchset #20 (id:420001)
5 years, 4 months ago (2015-08-20 00:59:23 UTC) #63
commit-bot: I haz the power
Patchset 20 (id:??) landed as https://crrev.com/e8e4f4fa67ee9db6c2910020ef49318e5df68481 Cr-Commit-Position: refs/heads/master@{#344389}
5 years, 4 months ago (2015-08-20 01:00:10 UTC) #64
Nico
This broke the clang/win build, can you take a look? FAILED: ninja -t msvc -e ...
5 years, 4 months ago (2015-08-20 01:55:32 UTC) #66
Adam Rice
5 years, 4 months ago (2015-08-20 09:21:16 UTC) #67
Message was sent while issue was closed.
A revert of this CL (patchset #20 id:420001) has been created in
https://codereview.chromium.org/1286883003/ by ricea@chromium.org.

The reason for reverting is: Suspected of breaking XP Tests. See, for example
https://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%281%29/build...
. .

Powered by Google App Engine
This is Rietveld 408576698