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

Issue 1154613006: Update pepper to not assume that SharedMemoryHandle is an int. (Closed)

Created:
5 years, 6 months ago by erikchen
Modified:
5 years, 6 months ago
Reviewers:
bbudge, piman
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, jam, gavinp+memory_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update pepper to not assume that SharedMemoryHandle is an int. This CL is a refactor. This CL contains no intended behavior changes. Pepper code assumes that SharedMemoryHandle is backed by a PlatformFile, and that the relevant HANDLE or fd can be cast to an int. These assumptions will no longer be true once SharedMemory is backed by Mach primitives on Mac. This CL adds the method ShareSharedMemoryHandleWithRemote() to ProxyChannel::Delegate. This method is used in place of ShareHandleWithRemote() when a SharedMemory object is being shared between processes. This CL updates the type of all SharedMemory handles to be SharedMemoryHandle. BUG=466437 Committed: https://crrev.com/4fc32d5dd347edbc0dfac470e7fa9b78b0923b72 Cr-Commit-Position: refs/heads/master@{#332325}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : Remove changes to base/memory. #

Total comments: 18

Patch Set 5 : Comments from piman. #

Total comments: 4

Patch Set 6 : Comments from piman, round two. #

Patch Set 7 : Replace unnecessary #includes with forward declarations. #

Total comments: 1

Patch Set 8 : Another nits pass. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -177 lines) Patch
M chrome/renderer/pepper/pepper_shared_memory_message_filter.cc View 1 chunk +2 lines, -10 lines 0 comments Download
M content/common/pepper_file_util.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/common/pepper_file_util.cc View 1 chunk +0 lines, -11 lines 0 comments Download
M content/ppapi_plugin/ppapi_thread.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/ppapi_plugin/ppapi_thread.cc View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
M content/public/renderer/renderer_ppapi_host.h View 2 chunks +8 lines, -0 lines 0 comments Download
M content/renderer/npapi/webplugin_delegate_proxy.cc View 1 2 3 1 chunk +1 line, -8 lines 0 comments Download
M content/renderer/pepper/audio_helper.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/audio_helper.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M content/renderer/pepper/host_array_buffer_var.cc View 1 2 chunks +4 lines, -9 lines 0 comments Download
M content/renderer/pepper/mock_renderer_ppapi_host.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/pepper/mock_renderer_ppapi_host.cc View 1 1 chunk +7 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_audio_input_host.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M content/renderer/pepper/pepper_compositor_host.cc View 1 2 3 4 1 chunk +5 lines, -9 lines 0 comments Download
M content/renderer/pepper/pepper_media_stream_track_host_base.cc View 1 chunk +1 line, -3 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_input.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/pepper_proxy_channel_delegate_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_proxy_channel_delegate_impl.cc View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_video_capture_host.cc View 1 2 3 4 5 1 chunk +3 lines, -13 lines 0 comments Download
M content/renderer/pepper/pepper_video_decoder_host.cc View 1 chunk +1 line, -3 lines 0 comments Download
M content/renderer/pepper/pepper_video_encoder_host.cc View 1 2 3 2 chunks +6 lines, -8 lines 0 comments Download
M content/renderer/pepper/pepper_video_source_host.cc View 2 chunks +4 lines, -11 lines 0 comments Download
M content/renderer/pepper/ppb_audio_impl.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/pepper/ppb_audio_impl.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/pepper/ppb_buffer_impl.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/pepper/ppb_buffer_impl.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M content/renderer/pepper/ppb_image_data_impl.h View 5 chunks +9 lines, -4 lines 0 comments Download
M content/renderer/pepper/ppb_image_data_impl.cc View 1 2 3 4 3 chunks +10 lines, -9 lines 0 comments Download
M content/renderer/pepper/renderer_ppapi_host_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/pepper/renderer_ppapi_host_impl.cc View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
M ppapi/nacl_irt/ppapi_dispatcher.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/nacl_irt/ppapi_dispatcher.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_proxy_test.h View 1 2 chunks +6 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_proxy_test.cc View 1 2 3 4 2 chunks +25 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_audio_proxy.cc View 1 2 3 4 5 4 chunks +10 lines, -9 lines 0 comments Download
M ppapi/proxy/ppb_buffer_proxy.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M ppapi/proxy/ppb_buffer_proxy.cc View 1 2 3 4 5 2 chunks +4 lines, -14 lines 0 comments Download
M ppapi/proxy/ppb_graphics_3d_proxy.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M ppapi/proxy/ppb_image_data_proxy.h View 2 chunks +3 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_image_data_proxy.cc View 5 chunks +8 lines, -16 lines 0 comments Download
M ppapi/proxy/ppp_content_decryptor_private_proxy.cc View 1 2 3 4 5 1 chunk +5 lines, -12 lines 0 comments Download
M ppapi/proxy/proxy_channel.h View 1 3 chunks +18 lines, -0 lines 0 comments Download
M ppapi/proxy/proxy_channel.cc View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M ppapi/thunk/ppb_audio_api.h View 1 2 3 4 5 6 2 chunks +6 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_buffer_api.h View 1 2 3 4 5 6 2 chunks +5 lines, -1 line 0 comments Download
M ppapi/thunk/ppb_image_data_api.h View 2 chunks +3 lines, -1 line 2 comments Download

Messages

Total messages: 37 (14 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/1154613006/20001
5 years, 6 months ago (2015-05-28 20:28:24 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/93290)
5 years, 6 months ago (2015-05-28 20:53:58 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/1154613006/40001
5 years, 6 months ago (2015-05-29 00:32:46 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-05-29 01:37:51 UTC) #8
erikchen
piman: Please review. The changes to base/memory are being reviewed in a separate CL: https://codereview.chromium.org/1164473003/. ...
5 years, 6 months ago (2015-05-29 21:50:39 UTC) #10
erikchen
On 2015/05/29 21:50:39, erikchen wrote: > piman: Please review. > > The changes to base/memory ...
5 years, 6 months ago (2015-06-01 19:54:40 UTC) #11
piman
https://codereview.chromium.org/1154613006/diff/60001/content/renderer/pepper/audio_helper.cc File content/renderer/pepper/audio_helper.cc (right): https://codereview.chromium.org/1154613006/diff/60001/content/renderer/pepper/audio_helper.cc#newcode34 content/renderer/pepper/audio_helper.cc:34: *shm_handle = base::SharedMemory::ShallowCopyHandle( Do we need ShallowCopyHandle at all? ...
5 years, 6 months ago (2015-06-01 22:16:08 UTC) #12
erikchen
piman: PTAL https://codereview.chromium.org/1154613006/diff/60001/content/renderer/pepper/audio_helper.cc File content/renderer/pepper/audio_helper.cc (right): https://codereview.chromium.org/1154613006/diff/60001/content/renderer/pepper/audio_helper.cc#newcode34 content/renderer/pepper/audio_helper.cc:34: *shm_handle = base::SharedMemory::ShallowCopyHandle( On 2015/06/01 22:16:08, piman ...
5 years, 6 months ago (2015-06-01 23:48:53 UTC) #14
piman
https://codereview.chromium.org/1154613006/diff/100001/content/renderer/pepper/audio_helper.cc File content/renderer/pepper/audio_helper.cc (right): https://codereview.chromium.org/1154613006/diff/100001/content/renderer/pepper/audio_helper.cc#newcode34 content/renderer/pepper/audio_helper.cc:34: shm = shared_memory_for_create_callback_.get(); That won't do anything. This only ...
5 years, 6 months ago (2015-06-02 00:00:15 UTC) #16
erikchen
https://codereview.chromium.org/1154613006/diff/100001/content/renderer/pepper/audio_helper.cc File content/renderer/pepper/audio_helper.cc (right): https://codereview.chromium.org/1154613006/diff/100001/content/renderer/pepper/audio_helper.cc#newcode34 content/renderer/pepper/audio_helper.cc:34: shm = shared_memory_for_create_callback_.get(); On 2015/06/02 00:00:15, piman (Very slow ...
5 years, 6 months ago (2015-06-02 00:01:47 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/1154613006/100001
5 years, 6 months ago (2015-06-02 00:06:52 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1154613006/120001
5 years, 6 months ago (2015-06-02 00:18:42 UTC) #21
piman
lgtm
5 years, 6 months ago (2015-06-02 00:22:31 UTC) #22
erikchen
https://codereview.chromium.org/1154613006/diff/100001/content/renderer/pepper/ppb_buffer_impl.cc File content/renderer/pepper/ppb_buffer_impl.cc (right): https://codereview.chromium.org/1154613006/diff/100001/content/renderer/pepper/ppb_buffer_impl.cc#newcode82 content/renderer/pepper/ppb_buffer_impl.cc:82: shm = shared_memory_.get(); On 2015/06/02 00:00:15, piman (Very slow ...
5 years, 6 months ago (2015-06-02 00:28:38 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1154613006/160001
5 years, 6 months ago (2015-06-02 00:32:44 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/67394)
5 years, 6 months ago (2015-06-02 00:52:11 UTC) #28
erikchen
bbudge: Looking for an OWNER review of chrome/renderer/pepper/* ppapi/nacl_irt/* ppapi/thunk/*
5 years, 6 months ago (2015-06-02 00:55:35 UTC) #30
bbudge
chrome/renderer/pepper/* ppapi/nacl_irt/* ppapi/thunk/* LGTM w/ a question https://codereview.chromium.org/1154613006/diff/160001/ppapi/thunk/ppb_image_data_api.h File ppapi/thunk/ppb_image_data_api.h (right): https://codereview.chromium.org/1154613006/diff/160001/ppapi/thunk/ppb_image_data_api.h#newcode8 ppapi/thunk/ppb_image_data_api.h:8: #include "base/memory/shared_memory.h" ...
5 years, 6 months ago (2015-06-02 01:02:04 UTC) #31
erikchen
https://codereview.chromium.org/1154613006/diff/160001/ppapi/thunk/ppb_image_data_api.h File ppapi/thunk/ppb_image_data_api.h (right): https://codereview.chromium.org/1154613006/diff/160001/ppapi/thunk/ppb_image_data_api.h#newcode8 ppapi/thunk/ppb_image_data_api.h:8: #include "base/memory/shared_memory.h" On 2015/06/02 01:02:03, bbudge wrote: > Can ...
5 years, 6 months ago (2015-06-02 01:05:25 UTC) #32
erikchen
On 2015/06/02 01:05:25, erikchen wrote: > https://codereview.chromium.org/1154613006/diff/160001/ppapi/thunk/ppb_image_data_api.h > File ppapi/thunk/ppb_image_data_api.h (right): > > https://codereview.chromium.org/1154613006/diff/160001/ppapi/thunk/ppb_image_data_api.h#newcode8 > ...
5 years, 6 months ago (2015-06-02 01:07:20 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1154613006/160001
5 years, 6 months ago (2015-06-02 01:48:07 UTC) #35
commit-bot: I haz the power
Committed patchset #8 (id:160001)
5 years, 6 months ago (2015-06-02 02:16:47 UTC) #36
commit-bot: I haz the power
5 years, 6 months ago (2015-06-02 02:17:31 UTC) #37
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/4fc32d5dd347edbc0dfac470e7fa9b78b0923b72
Cr-Commit-Position: refs/heads/master@{#332325}

Powered by Google App Engine
This is Rietveld 408576698