New issue
Advanced search Search tips

Issue 844065 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Consider adding more granular shared buffer types to mojom

Project Member Reported by roc...@chromium.org, May 17 2018

Issue description

Shared buffers are represented by handle<shared_buffer> in mojom. In every conceivable scenario, we would prefer for these types to be more specific to accurately convey access mode (i.e. writable, unsafe, or read-only).

Right now this means we have wrapper structs defined in the mojo_base mojom library, type-mapping to //base equivalents (i.e. one of base::ReadOnlySharedMemoryRegion, base::WritableSharedMemoryRegion, base::UnsafeSharedMemoryRegion).

We could instead replace handle<shared_buffer> with handle<read_only_shared_buffer>, handle<unsafe_shared_buffer> and handle<writable_shared_buffer>. These could all map to appropriate types in each target language -- this would require adding some equivalents to org.chromium.base for Java code, and probably some Mojo-specific shared memory region types to Blink Mojo IDL.
 

Sign in to add a comment