Allow WritableSharedMemoryRegion to Unsafe conversion

This CL adds a new ConvertToUnsafe() method to the WritableSharedMemoryRegion
class. This new method is similar to ConvertToReadOnly() in structure. The
conversion does not modify an underlying platform handle (except it closes a
read-only handle on POSIX) but changes region's type.

Bug: 795291
Change-Id: Ie0a6b4c9850c0e223ee9299655f9bfd6c79c383b
Reviewed-by: Daniel Cheng <>
Commit-Queue: Alexandr Ilin <>
Cr-Commit-Position: refs/heads/master@{#574610}
9 files changed