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

Issue 2859843002: Add a GUID to base::SharedMemoryHandle. (Closed)

Created:
3 years, 7 months ago by erikchen
Modified:
3 years, 7 months ago
CC:
chromium-reviews, danakj+watch_chromium.org, gavinp+memory_chromium.org, mac-reviews_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a GUID to base::SharedMemoryHandle. This allows SharedMemoryHandle to be tracked across processes. SharedMemoryHandles that point to the same region should have the same GUID. This CL does not finish all of the GUID plumbing. The following still needs to be done: * Passing GUID through Mojo. rockot@ has said that he will do this and TODOs have been left for him in the code. * Passing GUID for base::FieldTrial, which requires a SharedMemoryHandle shortly after proess launch, before IPC is set up. * Updating ArcGpuVideoDecodeAccelerator to use mojo ScopedHandles instead of fds. * Updating serialization of gfx::GpuMemoryBufferHandle to pass through shared buffer handles instead of generic handles. BUG=713763 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Review-Url: https://codereview.chromium.org/2859843002 Cr-Commit-Position: refs/heads/master@{#469877} Committed: https://chromium.googlesource.com/chromium/src/+/145252018a78e2102e148f238970fd411e10a706

Patch Set 1 #

Patch Set 2 : More fixes #

Patch Set 3 : More fixes. #

Patch Set 4 : Compile fixes. #

Patch Set 5 : compile errors. #

Patch Set 6 : Compile errors. #

Patch Set 7 : Compile error. #

Patch Set 8 : Compile fixes. #

Total comments: 14

Patch Set 9 : Comments from wfh, rockot, thakis. #

Patch Set 10 : update comment. #

Patch Set 11 : windows compile errors. #

Patch Set 12 : comments from thakis. #

Patch Set 13 : More typos. #

Patch Set 14 : compile erorr #

Patch Set 15 : fix ppapi error. #

Patch Set 16 : accidentally dupicated line #

Total comments: 2

Patch Set 17 : Check validity before writing handle. #

Total comments: 8

Patch Set 18 : comments form thakis and fix bootstrap.py #

Patch Set 19 : fix guid on android. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -139 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M base/memory/shared_memory.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -2 lines 0 comments Download
M base/memory/shared_memory_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -1 line 0 comments Download
M base/memory/shared_memory_handle.h View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +38 lines, -15 lines 0 comments Download
A base/memory/shared_memory_handle.cc View 1 chunk +19 lines, -0 lines 0 comments Download
M base/memory/shared_memory_handle_mac.cc View 1 2 3 4 5 chunks +12 lines, -34 lines 0 comments Download
M base/memory/shared_memory_handle_posix.cc View 1 2 3 4 2 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 +5 lines, -17 lines 0 comments Download
M base/memory/shared_memory_mac.cc View 1 2 3 5 chunks +9 lines, -7 lines 0 comments Download
M base/memory/shared_memory_mac_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +10 lines, -6 lines 0 comments Download
M base/memory/shared_memory_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +17 lines, -4 lines 0 comments Download
M base/memory/shared_memory_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +5 lines, -2 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 16 17 4 chunks +16 lines, -4 lines 0 comments Download
M base/metrics/field_trial.cc View 1 2 3 4 5 6 7 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/gpu/arc_gpu_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -1 line 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 11 chunks +73 lines, -15 lines 0 comments Download
M mojo/edk/embedder/platform_shared_buffer.cc View 1 2 3 4 5 6 7 2 chunks +12 lines, -8 lines 0 comments Download
M mojo/edk/system/platform_wrapper_unittest.cc View 1 2 3 4 5 6 1 chunk +5 lines, -3 lines 0 comments Download
M mojo/public/cpp/system/platform_handle.cc View 1 2 3 1 chunk +7 lines, -4 lines 0 comments Download
M ppapi/proxy/nacl_message_scanner.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +16 lines, -2 lines 0 comments Download
M sandbox/win/src/process_mitigations_win32k_dispatcher.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M sandbox/win/tests/common/controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -1 line 0 comments Download
M tools/gn/bootstrap/bootstrap.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +2 lines, -0 lines 0 comments Download
M ui/gfx/mojo/buffer_types_struct_traits.cc View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -3 lines 0 comments Download

Messages

Total messages: 89 (63 generated)
erikchen
thakis, rockot: Please review.
3 years, 7 months ago (2017-05-04 17:33:44 UTC) #27
erikchen
wfh: Please review sandbox/win
3 years, 7 months ago (2017-05-04 17:34:06 UTC) #29
Nico
Adding a GUID to SMH feels like SMH is now maybe handling too many things ...
3 years, 7 months ago (2017-05-04 17:42:13 UTC) #30
Will Harris
https://codereview.chromium.org/2859843002/diff/140001/ipc/ipc_message_utils.cc File ipc/ipc_message_utils.cc (right): https://codereview.chromium.org/2859843002/diff/140001/ipc/ipc_message_utils.cc#newcode694 ipc/ipc_message_utils.cc:694: ParamTraits<base::UnguessableToken>::Write(m, p.GetGUID()); should there be a DCHECK here that ...
3 years, 7 months ago (2017-05-04 17:50:51 UTC) #31
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2859843002/diff/140001/chrome/gpu/arc_gpu_video_decode_accelerator.cc File chrome/gpu/arc_gpu_video_decode_accelerator.cc (right): https://codereview.chromium.org/2859843002/diff/140001/chrome/gpu/arc_gpu_video_decode_accelerator.cc#newcode299 chrome/gpu/arc_gpu_video_decode_accelerator.cc:299: // TODO(rockot): Pass GUIDs through Mojo. https://crbug.com/713763. not sure ...
3 years, 7 months ago (2017-05-04 17:54:51 UTC) #33
erikchen
On 2017/05/04 17:42:13, Nico wrote: > Adding a GUID to SMH feels like SMH is ...
3 years, 7 months ago (2017-05-04 18:22:20 UTC) #36
erikchen
thakis, rockot, wfh: PTAL https://codereview.chromium.org/2859843002/diff/140001/base/memory/shared_memory_handle.h File base/memory/shared_memory_handle.h (right): https://codereview.chromium.org/2859843002/diff/140001/base/memory/shared_memory_handle.h#newcode65 base/memory/shared_memory_handle.h:65: base::UnguessableToken GetGUID() const; On 2017/05/04 ...
3 years, 7 months ago (2017-05-04 19:21:13 UTC) #40
Ken Rockot(use gerrit already)
lgtm
3 years, 7 months ago (2017-05-04 19:31:55 UTC) #42
Nico
On Thu, May 4, 2017 at 2:22 PM, <erikchen@chromium.org> wrote: > On 2017/05/04 17:42:13, Nico ...
3 years, 7 months ago (2017-05-04 19:32:04 UTC) #43
Will Harris
lgtm on sandbox/win/src/process_mitigations_win32k_dispatcher.cc but other than my comment above (that was addressed, thanks!) I'm happy ...
3 years, 7 months ago (2017-05-04 19:39:36 UTC) #44
erikchen
On 2017/05/04 19:32:04, Nico wrote: > On Thu, May 4, 2017 at 2:22 PM, <mailto:erikchen@chromium.org> ...
3 years, 7 months ago (2017-05-04 19:49:27 UTC) #45
Nico
On Thu, May 4, 2017 at 3:49 PM, <erikchen@chromium.org> wrote: > On 2017/05/04 19:32:04, Nico ...
3 years, 7 months ago (2017-05-04 19:51:18 UTC) #46
erikchen
> > Ok, that sounds reasonable to me. Could you update the class comments of ...
3 years, 7 months ago (2017-05-04 20:01:35 UTC) #47
erikchen
bbudge: Please review ppapi/
3 years, 7 months ago (2017-05-04 23:28:07 UTC) #59
bbudge
ppapi lgtm w/comment https://codereview.chromium.org/2859843002/diff/300001/ipc/ipc_message_utils.cc File ipc/ipc_message_utils.cc (right): https://codereview.chromium.org/2859843002/diff/300001/ipc/ipc_message_utils.cc#newcode624 ipc/ipc_message_utils.cc:624: // nacl_ipc_adapater.cc:WriteHandle(). This comment seems like ...
3 years, 7 months ago (2017-05-05 00:35:39 UTC) #62
erikchen
https://codereview.chromium.org/2859843002/diff/300001/ipc/ipc_message_utils.cc File ipc/ipc_message_utils.cc (right): https://codereview.chromium.org/2859843002/diff/300001/ipc/ipc_message_utils.cc#newcode624 ipc/ipc_message_utils.cc:624: // nacl_ipc_adapater.cc:WriteHandle(). On 2017/05/05 00:35:39, bbudge wrote: > This ...
3 years, 7 months ago (2017-05-05 00:57:00 UTC) #65
erikchen
On 2017/05/05 00:57:00, erikchen wrote: > https://codereview.chromium.org/2859843002/diff/300001/ipc/ipc_message_utils.cc > File ipc/ipc_message_utils.cc (right): > > https://codereview.chromium.org/2859843002/diff/300001/ipc/ipc_message_utils.cc#newcode624 > ...
3 years, 7 months ago (2017-05-05 01:36:41 UTC) #69
Nico
gltm https://codereview.chromium.org/2859843002/diff/320001/base/memory/shared_memory_mac_unittest.cc File base/memory/shared_memory_mac_unittest.cc (right): https://codereview.chromium.org/2859843002/diff/320001/base/memory/shared_memory_mac_unittest.cc#newcode365 base/memory/shared_memory_mac_unittest.cc:365: // Tests that the read-only flag works. do ...
3 years, 7 months ago (2017-05-05 18:34:37 UTC) #72
Nico
> gltm lgtm
3 years, 7 months ago (2017-05-05 18:36:24 UTC) #73
erikchen
https://codereview.chromium.org/2859843002/diff/320001/base/memory/shared_memory_mac_unittest.cc File base/memory/shared_memory_mac_unittest.cc (right): https://codereview.chromium.org/2859843002/diff/320001/base/memory/shared_memory_mac_unittest.cc#newcode365 base/memory/shared_memory_mac_unittest.cc:365: // Tests that the read-only flag works. On 2017/05/05 ...
3 years, 7 months ago (2017-05-05 19:29:33 UTC) #74
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/2859843002/340001
3 years, 7 months ago (2017-05-05 19:30:24 UTC) #77
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/171756)
3 years, 7 months ago (2017-05-05 22:29:27 UTC) #79
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/2859843002/360001
3 years, 7 months ago (2017-05-05 22:41:07 UTC) #82
commit-bot: I haz the power
Try jobs failed on following builders: win10_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win10_chromium_x64_rel_ng/builds/914)
3 years, 7 months ago (2017-05-05 23:40:14 UTC) #84
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/2859843002/360001
3 years, 7 months ago (2017-05-06 00:17:43 UTC) #86
commit-bot: I haz the power
3 years, 7 months ago (2017-05-06 19:17:05 UTC) #89
Message was sent while issue was closed.
Committed patchset #19 (id:360001) as
https://chromium.googlesource.com/chromium/src/+/145252018a78e2102e148f238970...

Powered by Google App Engine
This is Rietveld 408576698