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

Issue 1320783002: Make SharedMemoryHandle a class on windows. (Closed)

Created:
5 years, 3 months ago by erikchen
Modified:
5 years, 2 months ago
CC:
chromium-reviews, gavinp+memory_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@ipc_global
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make SharedMemoryHandle a class on windows. This CL is intended to be a refactor and should not introduce any behavior changes. Previously, SharedMemoryhandle was typedefed to HANDLE. Making it a class allows us to add metainformation about the process in which the HANDLE is valid. This will be used in the future by Chrome's IPC system to automatically duplicate HANDLEs into their destination process. BUG=493414, 535028 Committed: https://crrev.com/5ea2ab75db847e7506f4e9e6f6b370f65cc1bb39 Cr-Commit-Position: refs/heads/master@{#350932}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : Rebase. #

Patch Set 6 : Rebase, add default constructor. #

Patch Set 7 : Fix more win compile errors. #

Patch Set 8 : Rebase #

Patch Set 9 : win compile errors #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : Compile fixes. #

Patch Set 14 : More compile fixes. #

Patch Set 15 : Fix incorrect assumptions. #

Patch Set 16 : Fix DCHECK. #

Total comments: 6

Patch Set 17 : Rebase. #

Patch Set 18 : Comments from tsepez. #

Patch Set 19 : Add a safety check. #

Total comments: 5

Patch Set 20 : Rebase. #

Patch Set 21 : Comments from thestig. #

Patch Set 22 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -134 lines) Patch
M base/base.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M base/memory/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M base/memory/shared_memory_handle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +44 lines, -3 lines 0 comments Download
A base/memory/shared_memory_handle_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +68 lines, -0 lines 0 comments Download
M base/memory/shared_memory_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -15 lines 0 comments Download
M base/memory/shared_memory_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +20 lines, -20 lines 0 comments Download
M components/mus/gles2/command_buffer_driver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -1 line 0 comments Download
M components/nacl/loader/nacl_ipc_adapter.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/printing/renderer/print_web_view_helper_pdf_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M content/browser/compositor/software_output_device_win.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +3 lines, -4 lines 0 comments Download
M content/common/dwrite_font_platform_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +8 lines, -4 lines 0 comments Download
M content/common/gpu/client/gpu_channel_host.cc View 1 2 3 4 5 1 chunk +0 lines, -6 lines 0 comments Download
M content/common/sandbox_init_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +9 lines, -2 lines 0 comments Download
M content/common/sandbox_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -2 lines 0 comments Download
M content/gpu/gpu_child_thread.cc View 1 5 1 chunk +6 lines, -6 lines 0 comments Download
M content/plugin/webplugin_proxy.cc View 1 2 3 4 5 6 1 chunk +4 lines, -7 lines 0 comments Download
M content/ppapi_plugin/ppapi_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -1 line 0 comments Download
M content/renderer/media/video_capture_message_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/npapi/webplugin_delegate_proxy.cc View 1 2 3 5 2 chunks +3 lines, -5 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_input.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_channel_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -2 lines 0 comments Download
M ipc/ipc_channel_posix_unittest.cc View 1 2 3 4 5 6 7 6 chunks +12 lines, -12 lines 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 18 19 1 chunk +1 line, -2 lines 0 comments Download
M ipc/ipc_message_utils.h View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M ipc/ipc_message_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +55 lines, -2 lines 0 comments Download
M mojo/gles2/command_buffer_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/ppb_image_data_proxy.cc View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M remoting/host/desktop_session_agent.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/desktop_session_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +7 lines, -2 lines 0 comments Download
M sandbox/win/src/handle_inheritance_test.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M sandbox/win/src/policy_target_test.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M sandbox/win/tests/common/controller.cc View 1 2 3 4 5 6 2 chunks +6 lines, -4 lines 0 comments Download
M ui/gfx/blit_unittest.cc View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M ui/surface/transport_dib.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M ui/surface/transport_dib_win.cc View 1 4 chunks +7 lines, -9 lines 0 comments Download

Messages

Total messages: 94 (40 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/1320783002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/60001
5 years, 3 months ago (2015-08-28 01:43:00 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/90749) ios_dbg_simulator_ninja on ...
5 years, 3 months ago (2015-08-28 01:45:19 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/1320783002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/100001
5 years, 3 months ago (2015-09-12 17:18:39 UTC) #7
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/103215)
5 years, 3 months ago (2015-09-12 17:56:58 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/120001
5 years, 3 months ago (2015-09-14 18:06:12 UTC) #11
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/82702) win_chromium_rel_ng on ...
5 years, 3 months ago (2015-09-14 18:40:55 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/1320783002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/140001
5 years, 3 months ago (2015-09-18 17:20:39 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/71218) ios_rel_device_ninja on ...
5 years, 3 months ago (2015-09-18 17:23:41 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/160001
5 years, 3 months ago (2015-09-18 17:42:54 UTC) #19
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/109462)
5 years, 3 months ago (2015-09-18 18:26:25 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/1320783002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/180001
5 years, 3 months ago (2015-09-18 20:53:51 UTC) #23
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/99506) ios_dbg_simulator_ninja on ...
5 years, 3 months ago (2015-09-18 20:56:42 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/200001
5 years, 3 months ago (2015-09-18 21:15:47 UTC) #27
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/42897)
5 years, 3 months ago (2015-09-18 22:02:19 UTC) #29
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/220001
5 years, 3 months ago (2015-09-18 23:59:33 UTC) #31
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/109695)
5 years, 3 months ago (2015-09-19 00:37:11 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/240001
5 years, 3 months ago (2015-09-19 00:57:10 UTC) #35
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/85330)
5 years, 3 months ago (2015-09-19 01:39:00 UTC) #37
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/280001
5 years, 3 months ago (2015-09-21 20:40:25 UTC) #39
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/43500)
5 years, 3 months ago (2015-09-21 21:22:08 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/280001
5 years, 3 months ago (2015-09-22 01:43:00 UTC) #43
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/110388)
5 years, 3 months ago (2015-09-22 02:37:44 UTC) #45
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/300001
5 years, 3 months ago (2015-09-22 22:01:11 UTC) #47
erikchen
tsepez: Please review.
5 years, 3 months ago (2015-09-23 00:07:06 UTC) #50
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/320001
5 years, 3 months ago (2015-09-23 00:08:53 UTC) #51
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/72424)
5 years, 3 months ago (2015-09-23 03:08:33 UTC) #53
Tom Sepez
https://codereview.chromium.org/1320783002/diff/320001/content/common/dwrite_font_platform_win.cc File content/common/dwrite_font_platform_win.cc (right): https://codereview.chromium.org/1320783002/diff/320001/content/common/dwrite_font_platform_win.cc#newcode942 content/common/dwrite_font_platform_win.cc:942: reinterpret_cast<unsigned int*>(&handle_int)); note: technically wrong, this needs to be ...
5 years, 3 months ago (2015-09-23 22:06:13 UTC) #54
erikchen
tsepez: PTAL https://codereview.chromium.org/1320783002/diff/320001/content/common/dwrite_font_platform_win.cc File content/common/dwrite_font_platform_win.cc (right): https://codereview.chromium.org/1320783002/diff/320001/content/common/dwrite_font_platform_win.cc#newcode942 content/common/dwrite_font_platform_win.cc:942: reinterpret_cast<unsigned int*>(&handle_int)); On 2015/09/23 22:06:13, Tom Sepez ...
5 years, 3 months ago (2015-09-24 00:44:18 UTC) #55
erikchen
thakis: Looking for a base/ review.
5 years, 3 months ago (2015-09-24 15:30:24 UTC) #57
Nico
base lgtm https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle_win.cc File base/memory/shared_memory_handle_win.cc (right): https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle_win.cc#newcode11 base/memory/shared_memory_handle_win.cc:11: SharedMemoryHandle::SharedMemoryHandle() : handle_(nullptr), pid_(0) {} (i'm assuming ...
5 years, 3 months ago (2015-09-24 15:48:54 UTC) #58
Tom Sepez
lgtm
5 years, 3 months ago (2015-09-24 16:15:38 UTC) #59
erikchen
https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle_win.cc File base/memory/shared_memory_handle_win.cc (right): https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle_win.cc#newcode11 base/memory/shared_memory_handle_win.cc:11: SharedMemoryHandle::SharedMemoryHandle() : handle_(nullptr), pid_(0) {} On 2015/09/24 15:48:54, Nico ...
5 years, 3 months ago (2015-09-24 16:32:42 UTC) #60
erikchen
wfh: Looking for a review of sandbox/win/ kbr: Looking for a review of ui/surface avi: ...
5 years, 3 months ago (2015-09-24 16:36:30 UTC) #62
erikchen
thestig: Please review components/printing/ mseaborn: Please review components/nacl/ sky: Please review components/mus/gles2/ and mojo/gles2/ piman: ...
5 years, 3 months ago (2015-09-24 16:43:20 UTC) #64
Ken Russell (switch to Gerrit)
ui/surface LGTM
5 years, 3 months ago (2015-09-24 16:43:21 UTC) #65
erikchen
thestig: Please review components/printing/ mseaborn: Please review components/nacl/ sky: Please review components/mus/gles2/ and mojo/gles2/ piman: ...
5 years, 3 months ago (2015-09-24 16:44:26 UTC) #67
Nico
https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle_win.cc File base/memory/shared_memory_handle_win.cc (right): https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle_win.cc#newcode11 base/memory/shared_memory_handle_win.cc:11: SharedMemoryHandle::SharedMemoryHandle() : handle_(nullptr), pid_(0) {} On 2015/09/24 16:32:42, erikchen ...
5 years, 3 months ago (2015-09-24 16:47:43 UTC) #68
erikchen
On 2015/09/24 16:47:43, Nico (traveling Tue Sep 22) wrote: > https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle_win.cc > File base/memory/shared_memory_handle_win.cc (right): ...
5 years, 3 months ago (2015-09-24 16:49:28 UTC) #69
Mark Seaborn
On 2015/09/24 16:44:26, erikchen wrote: > mseaborn: Please review components/nacl/ LGTM
5 years, 3 months ago (2015-09-24 17:02:39 UTC) #70
Will Harris
> wfh: Looking for a review of sandbox/win/ sandbox/win lgtm
5 years, 3 months ago (2015-09-24 17:06:06 UTC) #71
Avi (use Gerrit)
content and ui lgtm
5 years, 3 months ago (2015-09-24 17:52:38 UTC) #72
Lei Zhang
+brucedawson since he's been touching the same code in base. https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle.h File base/memory/shared_memory_handle.h (right): https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle.h#newcode69 ...
5 years, 3 months ago (2015-09-24 18:04:39 UTC) #74
sky
LGTM
5 years, 3 months ago (2015-09-24 19:19:48 UTC) #75
Lei Zhang
components/printing lgtm
5 years, 3 months ago (2015-09-24 19:24:49 UTC) #76
erikchen
https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle.h File base/memory/shared_memory_handle.h (right): https://codereview.chromium.org/1320783002/diff/380001/base/memory/shared_memory_handle.h#newcode69 base/memory/shared_memory_handle.h:69: // The process in which |handle_| is valid and ...
5 years, 3 months ago (2015-09-24 20:57:38 UTC) #77
piman
LGTM. IWBN if eventually the posix and windows versions of SharedMemoryHandle supported the same interface ...
5 years, 3 months ago (2015-09-24 21:26:29 UTC) #78
garykac
remoting lgtm
5 years, 2 months ago (2015-09-25 18:37:52 UTC) #79
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/420001
5 years, 2 months ago (2015-09-25 19:05:25 UTC) #82
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/73968) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 2 months ago (2015-09-25 19:08:59 UTC) #84
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/460001
5 years, 2 months ago (2015-09-25 19:24:23 UTC) #88
commit-bot: I haz the power
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/57877)
5 years, 2 months ago (2015-09-25 20:31:24 UTC) #90
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1320783002/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1320783002/460001
5 years, 2 months ago (2015-09-25 20:39:38 UTC) #92
commit-bot: I haz the power
Committed patchset #22 (id:460001)
5 years, 2 months ago (2015-09-25 22:34:40 UTC) #93
commit-bot: I haz the power
5 years, 2 months ago (2015-09-25 22:36:34 UTC) #94
Message was sent while issue was closed.
Patchset 22 (id:??) landed as
https://crrev.com/5ea2ab75db847e7506f4e9e6f6b370f65cc1bb39
Cr-Commit-Position: refs/heads/master@{#350932}

Powered by Google App Engine
This is Rietveld 408576698