Descriptionmac: Add auto-close and share-read-only functionality to Mach based SharedMemory.
base::FileDescriptor has a property |auto_close| that is used to indicate that
when the object is passed to an IPC message, the message takes ownership of the
underlying OS handle. Since SharedMemoryHandle needs to be interchangeable with
base::FileDescriptor, I added a property with similar functionality named
|ownership_passes_to_ipc_|.
The method ShareToProcess() is used to lower the current and maximum protection
of the underlying OS handle before it is transferred to a different process. I
implemented this functionality for Mach memory objects.
BUG=535711
Committed: https://crrev.com/033bbbcb63cab781552dfb435c035131c423de30
Cr-Commit-Position: refs/heads/master@{#355880}
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : #
Total comments: 4
Patch Set 5 : Comments from mark. #
Messages
Total messages: 21 (6 generated)
|