|
|
Created:
4 years ago by Ken Rockot(use gerrit already) Modified:
4 years ago 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. |
DescriptionMojo: 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 : . #
Messages
Total messages: 30 (18 generated)
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
rockot@chromium.org changed reviewers: + tsepez@chromium.org, yzshen@chromium.org
Yuzhu could you please look at //mojo, Tom at the mojom? Thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
https://codereview.chromium.org/2583583002/diff/20001/mojo/public/cpp/system/... File mojo/public/cpp/system/platform_handle.cc (right): https://codereview.chromium.org/2583583002/diff/20001/mojo/public/cpp/system/... mojo/public/cpp/system/platform_handle.cc:70: if (memory_handle == base::kInvalidPlatformFile) They are not compatible for comparison?
On POSIX, memory_handle is a PlatformFile (sadface) On Thu, Dec 15, 2016 at 12:26 PM, <yzshen@chromium.org> wrote: > > 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 comparison? > > https://codereview.chromium.org/2583583002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Oh, oops - missing a .fd On Thu, Dec 15, 2016 at 12:29 PM, Ken Rockot <rockot@chromium.org> wrote: > On POSIX, memory_handle is a PlatformFile (sadface) > > On Thu, Dec 15, 2016 at 12:26 PM, <yzshen@chromium.org> wrote: > >> >> 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 comparison? >> >> https://codereview.chromium.org/2583583002/ >> > > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Derp. It's a FileDescriptor not a PlatformFile. Fixed :) On Thu, Dec 15, 2016 at 12:30 PM, Ken Rockot <rockot@chromium.org> wrote: > Oh, oops - missing a .fd > > On Thu, Dec 15, 2016 at 12:29 PM, Ken Rockot <rockot@chromium.org> wrote: > >> On POSIX, memory_handle is a PlatformFile (sadface) >> >> On Thu, Dec 15, 2016 at 12:26 PM, <yzshen@chromium.org> wrote: >> >>> >>> https://codereview.chromium.org/2583583002/diff/20001/mojo/p >>> ublic/cpp/system/platform_handle.cc >>> File mojo/public/cpp/system/platform_handle.cc (right): >>> >>> https://codereview.chromium.org/2583583002/diff/20001/mojo/p >>> ublic/cpp/system/platform_handle.cc#newcode70 >>> mojo/public/cpp/system/platform_handle.cc:70: if (memory_handle == >>> base::kInvalidPlatformFile) >>> They are not compatible for comparison? >>> >>> https://codereview.chromium.org/2583583002/ >>> >> >> > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
LGTM if the bots are happy!
lgtm
The CQ bit was unchecked by rockot@chromium.org
The CQ bit was checked by rockot@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
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_...)
The CQ bit was checked by rockot@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1481840593458540, "parent_rev": "c56392b5d154d59b10ca6566f0e5dff1a5f9e61b", "commit_rev": "09898e6a9d882cbbaa5de5688df5bb3253da1200"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 Review-Url: https://codereview.chromium.org/2583583002 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== 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 Review-Url: https://codereview.chromium.org/2583583002 ========== to ========== 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} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/c11d6d1b41e00fe1e2e756ddbb601daa019a45cc Cr-Commit-Position: refs/heads/master@{#438955} |