New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 778325 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 2
Type: Bug



Sign in to add a comment

Better document / make return values from WrapPlatformFile / UnwrapPlatformFile / WrapSharedMemoryHandle / UnwrapSharedMemoryHandle consistent

Project Member Reported by dcheng@chromium.org, Oct 25 2017

Issue description

WrapPlatformFile / UnwrapPlatformFile appear to accept null / invalid handles. Unwrap appears to return MOJO_RESULT_OK as well.

WrapSharedMemoryHandle allows invalid handles to be wrapped, but UnwrappedSharedMemoryHandle returns MOJO_RESULT_INVALID_ARGUMENT when trying to unwrap an invalid handle. This should ideally be symmetrical.

As another data point, WrapMachPort / UnwrapMachPort appear to allow invalid / null handles as well.

It might be good to explicitly document how these helper functions handle null / invalid handles as well.
 
Cc: -roc...@chromium.org rockot@google.com
Status: Untriaged (was: Available)
Available, but no owner or component? Please find a component, as no one will ever find this without one.

Sign in to add a comment