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

Issue 1830853002: Make PlatformFileForTransit a class on Windows. (Closed)

Created:
4 years, 9 months ago by erikchen
Modified:
4 years, 8 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, chromoting-reviews_chromium.org, jam, rickyz+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make PlatformFileForTransit a class on Windows. This is required to transition consumers of PlatformFileForTransit into using attachment brokering. Alias PlatformFileForTransit to base::SharedMemoryHandle, since that class has the exact semantics required for brokering a HANDLE. I tried to avoid unnecessary functionality changes, but couldn't avoid changing some logic in NaclHostMessageFilter and DesktopSessionProxy. Both classes receive an IPC message that contain a HANDLE from the sender process, and try to copy the HANDLE into the current process. By switching to an attachment-brokerable class, PlatformFileForTransit is automatically brokered, so the duplication logic is no longer required. Expect future CLs to convert the remaining consumers of PlatformFileForTransit into using attachment brokering. BUG=493414 Committed: https://crrev.com/19e5f6905203ecd6adbbc4bfe57e086eb61028c6 Cr-Commit-Position: refs/heads/master@{#383849}

Patch Set 1 #

Patch Set 2 : Fix bug. #

Patch Set 3 : Fix bug. #

Patch Set 4 : Fix runtime error. Clang format. #

Patch Set 5 : Fix tests. #

Total comments: 6

Patch Set 6 : Comments from mseaborn. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -74 lines) Patch
M components/nacl/browser/nacl_host_message_filter.cc View 1 2 1 chunk +1 line, -23 lines 0 comments Download
M components/nacl/loader/nacl_ipc_adapter.cc View 1 2 3 4 5 3 chunks +6 lines, -6 lines 0 comments Download
M components/nacl/renderer/manifest_service_channel.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M components/nacl/renderer/plugin/pnacl_translate_thread.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M components/nacl/renderer/ppb_nacl_private_impl.cc View 1 2 3 4 5 2 chunks +3 lines, -4 lines 0 comments Download
M content/child/mojo/mojo_application.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/common/sandbox_util.cc View 1 chunk +5 lines, -2 lines 0 comments Download
M ipc/ipc_message_utils.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_platform_file.h View 3 chunks +11 lines, -4 lines 0 comments Download
M ipc/ipc_platform_file.cc View 1 2 3 4 1 chunk +7 lines, -7 lines 0 comments Download
M remoting/host/daemon_process_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/desktop_process_unittest.cc View 1 2 3 4 3 chunks +3 lines, -1 line 0 comments Download
M remoting/host/desktop_session_agent.cc View 2 chunks +3 lines, -1 line 0 comments Download
M remoting/host/desktop_session_proxy.cc View 1 2 3 4 1 chunk +1 line, -15 lines 0 comments Download
M remoting/host/remoting_me2me_host.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 40 (20 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/1830853002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1830853002/1
4 years, 9 months ago (2016-03-24 01:18:37 UTC) #2
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/186861)
4 years, 9 months ago (2016-03-24 02:53:36 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1830853002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1830853002/20001
4 years, 9 months ago (2016-03-24 18:23:33 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/194043)
4 years, 9 months ago (2016-03-24 21:28:48 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1830853002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1830853002/40001
4 years, 9 months ago (2016-03-24 23:21:06 UTC) #14
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/187339)
4 years, 9 months ago (2016-03-25 02:21:26 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1830853002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1830853002/60001
4 years, 9 months ago (2016-03-25 22:09:10 UTC) #18
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/187856)
4 years, 9 months ago (2016-03-26 00:40:55 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/1830853002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1830853002/80001
4 years, 8 months ago (2016-03-28 20:58:09 UTC) #23
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-03-28 22:22:11 UTC) #25
erikchen
mseaborn: Please review components/nacl avi: Please review content/ tsepez: Please review ipc/ sergeyu: Please review ...
4 years, 8 months ago (2016-03-28 23:17:24 UTC) #28
Tom Sepez
lgtm
4 years, 8 months ago (2016-03-28 23:42:04 UTC) #29
Avi (use Gerrit)
lgtm
4 years, 8 months ago (2016-03-29 01:30:59 UTC) #30
Sergey Ulanov
lgtm
4 years, 8 months ago (2016-03-29 18:19:41 UTC) #31
Mark Seaborn
LGTM https://codereview.chromium.org/1830853002/diff/80001/components/nacl/loader/nacl_ipc_adapter.cc File components/nacl/loader/nacl_ipc_adapter.cc (right): https://codereview.chromium.org/1830853002/diff/80001/components/nacl/loader/nacl_ipc_adapter.cc#newcode577 components/nacl/loader/nacl_ipc_adapter.cc:577: ))); Nit: should line up with iter->descriptor() args ...
4 years, 8 months ago (2016-03-29 19:24:10 UTC) #32
erikchen
https://codereview.chromium.org/1830853002/diff/80001/components/nacl/loader/nacl_ipc_adapter.cc File components/nacl/loader/nacl_ipc_adapter.cc (right): https://codereview.chromium.org/1830853002/diff/80001/components/nacl/loader/nacl_ipc_adapter.cc#newcode577 components/nacl/loader/nacl_ipc_adapter.cc:577: ))); On 2016/03/29 19:24:09, Mark Seaborn wrote: > Nit: ...
4 years, 8 months ago (2016-03-29 20:57:42 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1830853002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1830853002/100001
4 years, 8 months ago (2016-03-29 20:58:47 UTC) #36
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 8 months ago (2016-03-29 22:26:54 UTC) #37
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/19e5f6905203ecd6adbbc4bfe57e086eb61028c6 Cr-Commit-Position: refs/heads/master@{#383849}
4 years, 8 months ago (2016-03-29 22:28:26 UTC) #39
Nico
4 years, 8 months ago (2016-03-30 12:01:00 UTC) #40
Message was sent while issue was closed.
I believe this broke builds with GYP_DEFINES=enable_ipc_fuzzer=1:

e.g.
https://build.chromium.org/p/chromium.fyi/builders/CrWinAsan/builds/3207/step...
:

..\..\tools\ipc_fuzzer\fuzzer\fuzzer.cc(1356,8):  error: redefinition of
'ipc_fuzzer::FuzzTraits<base::SharedMemoryHandle>'
struct FuzzTraits<IPC::PlatformFileForTransit> {
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
..\..\tools\ipc_fuzzer\fuzzer\fuzzer.cc(458,8):  note: previous definition is
here
struct FuzzTraits<base::SharedMemoryHandle> {
       ^
1 error generated.

Can you take a look?

Powered by Google App Engine
This is Rietveld 408576698