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

Issue 2583583002: Mojo: Fix wrapping of invalid SharedMemoryHandles. (Closed)

Created:
4 years ago by Ken Rockot(use gerrit already)
Modified:
4 years ago
Reviewers:
Tom Sepez, yzshen1
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, Peng
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojo: Fix wrapping of invalid SharedMemoryHandles. When wrapping an invalid SharedMemoryHandle, we should always just return a null ScopedSharedBufferHandle. Currently we return a non-null ScopedSharedBufferHandle which wraps an invalid platform handle. This will always fail to serialize and is generally bad. Also fixes DiscardableSharedMemoryManager mojom to allow a null shared buffer handle in the response to AllocateLockedDiscardableSharedMemory. The existing client implementation already handles the null case, so no additional code changes are required BUG=674406 Committed: https://crrev.com/c11d6d1b41e00fe1e2e756ddbb601daa019a45cc Cr-Commit-Position: refs/heads/master@{#438955}

Patch Set 1 #

Patch Set 2 : . #

Total comments: 1

Patch Set 3 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -1 line) Patch
M components/discardable_memory/public/interfaces/discardable_shared_memory_manager.mojom View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/cpp/system/platform_handle.cc View 1 2 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (18 generated)
Ken Rockot(use gerrit already)
Yuzhu could you please look at //mojo, Tom at the mojom? Thanks!
4 years ago (2016-12-15 19:10:20 UTC) #4
yzshen1
https://codereview.chromium.org/2583583002/diff/20001/mojo/public/cpp/system/platform_handle.cc File mojo/public/cpp/system/platform_handle.cc (right): https://codereview.chromium.org/2583583002/diff/20001/mojo/public/cpp/system/platform_handle.cc#newcode70 mojo/public/cpp/system/platform_handle.cc:70: if (memory_handle == base::kInvalidPlatformFile) They are not compatible for ...
4 years ago (2016-12-15 20:26:43 UTC) #11
Ken Rockot(use gerrit already)
On POSIX, memory_handle is a PlatformFile (sadface) On Thu, Dec 15, 2016 at 12:26 PM, ...
4 years ago (2016-12-15 20:29:12 UTC) #12
Ken Rockot(use gerrit already)
Oh, oops - missing a .fd On Thu, Dec 15, 2016 at 12:29 PM, Ken ...
4 years ago (2016-12-15 20:30:21 UTC) #13
Ken Rockot(use gerrit already)
Derp. It's a FileDescriptor not a PlatformFile. Fixed :) On Thu, Dec 15, 2016 at ...
4 years ago (2016-12-15 20:31:14 UTC) #15
yzshen1
LGTM if the bots are happy!
4 years ago (2016-12-15 20:32:17 UTC) #17
Tom Sepez
lgtm
4 years ago (2016-12-15 21:04:17 UTC) #18
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/2583583002/40001
4 years ago (2016-12-15 21:07:03 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/357406)
4 years ago (2016-12-15 22:17:00 UTC) #23
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/2583583002/40001
4 years ago (2016-12-15 22:24:27 UTC) #25
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-15 23:41:51 UTC) #28
commit-bot: I haz the power
4 years ago (2016-12-15 23:45:58 UTC) #30
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/c11d6d1b41e00fe1e2e756ddbb601daa019a45cc
Cr-Commit-Position: refs/heads/master@{#438955}

Powered by Google App Engine
This is Rietveld 408576698