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

Issue 2875453002: Add a size parameter to SharedMemoryHandle. (Closed)

Created:
3 years, 7 months ago by erikchen
Modified:
3 years, 7 months ago
CC:
Aaron Boodman, abarth-chromium, asvitkine+watch_chromium.org, chromium-reviews, danakj+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, gavinp+memory_chromium.org, jam, mac-reviews_chromium.org, pennymac+watch_chromium.org, piman+watch_chromium.org, posciak+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, vmpstr+watch_chromium.org, wfh+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a size parameter to SharedMemoryHandle. This is needed to construct a Mojo shared buffer from a SharedMemoryHandle, which in turn is needed to pass GUIDs through Mojo. Previously, classes like gfx::GpuMemoryBufferHandle were being serialized as a file descriptor or Windows HANDLE, rather than a SharedMemoryHandle because they did not have access to a size field. BUG=713763 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Review-Url: https://codereview.chromium.org/2875453002 Cr-Commit-Position: refs/heads/master@{#472865} Committed: https://chromium.googlesource.com/chromium/src/+/9d6afd71a4937e9f400609f839c2b39b22c4c497

Patch Set 1 #

Patch Set 2 : add and fix tests #

Patch Set 3 : Fixes. #

Patch Set 4 : clang format, compile errors. #

Patch Set 5 : Compile errors. #

Patch Set 6 : compile error. #

Patch Set 7 : fix ui gfx #

Patch Set 8 : rebase. #

Patch Set 9 : clnag format #

Patch Set 10 : Fix IPC on POSIX. #

Total comments: 11

Patch Set 11 : comments from thakis. #

Patch Set 12 : Comments from thakis. #

Patch Set 13 : fix for android. #

Patch Set 14 : Remove extraneous period. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -335 lines) Patch
M base/memory/shared_memory.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -8 lines 0 comments Download
M base/memory/shared_memory_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -3 lines 0 comments Download
M base/memory/shared_memory_handle.h View 1 2 3 4 5 6 7 8 9 10 7 chunks +29 lines, -18 lines 0 comments Download
M base/memory/shared_memory_handle.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M base/memory/shared_memory_handle_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -27 lines 0 comments Download
M base/memory/shared_memory_handle_posix.cc View 3 chunks +6 lines, -7 lines 0 comments Download
M base/memory/shared_memory_handle_win.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -4 lines 0 comments Download
M base/memory/shared_memory_mac.cc View 1 2 3 4 5 6 7 4 chunks +6 lines, -19 lines 0 comments Download
M base/memory/shared_memory_posix.cc View 1 2 3 4 5 6 7 3 chunks +8 lines, -18 lines 0 comments Download
M base/memory/shared_memory_unittest.cc View 1 2 5 chunks +8 lines, -7 lines 0 comments Download
M base/memory/shared_memory_win.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -3 lines 0 comments Download
M base/metrics/field_trial.cc View 1 2 3 4 5 6 7 4 chunks +14 lines, -4 lines 0 comments Download
M chrome/gpu/arc_gpu_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -2 lines 0 comments Download
M components/exo/wayland/server.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_message_utils.cc View 1 2 3 4 5 6 7 8 9 6 chunks +66 lines, -146 lines 0 comments Download
M ipc/ipc_message_utils_unittest.cc View 1 2 chunks +20 lines, -0 lines 0 comments Download
M mojo/edk/embedder/platform_shared_buffer.cc View 2 chunks +12 lines, -6 lines 0 comments Download
M mojo/edk/system/platform_wrapper_unittest.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M mojo/public/cpp/system/platform_handle.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ppapi/proxy/nacl_message_scanner.cc View 1 chunk +1 line, -0 lines 0 comments Download
M sandbox/win/src/process_mitigations_win32k_dispatcher.cc View 5 chunks +13 lines, -10 lines 0 comments Download
M sandbox/win/tests/common/controller.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/mojo/buffer_types.mojom View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/mojo/buffer_types_struct_traits.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/mojo/buffer_types_struct_traits.cc View 1 2 3 4 5 6 2 chunks +8 lines, -41 lines 0 comments Download
M ui/surface/transport_dib_posix.cc View 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 69 (52 generated)
erikchen
thakis: Please review. rockot: Please review *ipc* and *mojo*
3 years, 7 months ago (2017-05-12 05:30:10 UTC) #41
Nico
As mentioned before, this "handle" class is imo getting way too heavy. Are there no ...
3 years, 7 months ago (2017-05-12 14:49:14 UTC) #42
erikchen
On 2017/05/12 14:49:14, Nico wrote: > As mentioned before, this "handle" class is imo getting ...
3 years, 7 months ago (2017-05-12 16:54:04 UTC) #43
Ken Rockot(use gerrit already)
I think maybe the issue here is that the word "handle" is a bit of ...
3 years, 7 months ago (2017-05-12 16:59:50 UTC) #44
Nico
On 2017/05/12 16:59:50, Ken Rockot wrote: > I think maybe the issue here is that ...
3 years, 7 months ago (2017-05-15 22:08:47 UTC) #45
Nico
I only looked at base/ https://codereview.chromium.org/2875453002/diff/180001/base/memory/shared_memory_android.cc File base/memory/shared_memory_android.cc (right): https://codereview.chromium.org/2875453002/diff/180001/base/memory/shared_memory_android.cc#newcode46 base/memory/shared_memory_android.cc:46: SharedMemoryHandle(base::FileDescriptor(dup(shm_.GetHandle()), false), Maybe SharedMemoryHandle ...
3 years, 7 months ago (2017-05-15 22:13:36 UTC) #46
erikchen
thakis: PTAL rockot: Please review everything not in base/ https://codereview.chromium.org/2875453002/diff/180001/base/memory/shared_memory_android.cc File base/memory/shared_memory_android.cc (right): https://codereview.chromium.org/2875453002/diff/180001/base/memory/shared_memory_android.cc#newcode46 base/memory/shared_memory_android.cc:46: ...
3 years, 7 months ago (2017-05-15 22:57:19 UTC) #47
Nico
https://codereview.chromium.org/2875453002/diff/180001/base/memory/shared_memory_android.cc File base/memory/shared_memory_android.cc (right): https://codereview.chromium.org/2875453002/diff/180001/base/memory/shared_memory_android.cc#newcode46 base/memory/shared_memory_android.cc:46: SharedMemoryHandle(base::FileDescriptor(dup(shm_.GetHandle()), false), On 2017/05/15 22:57:18, erikchen wrote: > On ...
3 years, 7 months ago (2017-05-15 23:11:56 UTC) #48
erikchen
On 2017/05/15 23:11:56, Nico wrote: > https://codereview.chromium.org/2875453002/diff/180001/base/memory/shared_memory_android.cc > File base/memory/shared_memory_android.cc (right): > > https://codereview.chromium.org/2875453002/diff/180001/base/memory/shared_memory_android.cc#newcode46 > ...
3 years, 7 months ago (2017-05-15 23:58:29 UTC) #49
Ken Rockot(use gerrit already)
non-base lgtm
3 years, 7 months ago (2017-05-16 00:11:26 UTC) #52
Nico
base/ lgtm
3 years, 7 months ago (2017-05-16 16:11:45 UTC) #55
erikchen
wfh: Please review ui/gfx/mojo/ and sandbox/win/ bbudge: Please review ppapi/proxy/nacl_message_scanner.cc reveman: Please review components/exo/OWNERS.
3 years, 7 months ago (2017-05-18 01:27:22 UTC) #59
Will Harris
lgtm for ui/gfx/mojo/ and sandbox/win/
3 years, 7 months ago (2017-05-18 01:56:21 UTC) #60
reveman
components/exo lgtm
3 years, 7 months ago (2017-05-18 03:57:58 UTC) #61
bbudge
ppapi/proxy/nacl_message_scanner.cc lgtm
3 years, 7 months ago (2017-05-18 11:56:38 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2875453002/260001
3 years, 7 months ago (2017-05-18 16:16:13 UTC) #66
commit-bot: I haz the power
3 years, 7 months ago (2017-05-18 17:49:27 UTC) #69
Message was sent while issue was closed.
Committed patchset #14 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/9d6afd71a4937e9f400609f839c2...

Powered by Google App Engine
This is Rietveld 408576698