DescriptionAdd a method BrokerDuplicateSharedMemoryHandle() to the sandbox.
This CL is a refactor and has no intended behavior change.
On Windows, a sandboxed process calls content::BrokerDuplicateHandle to
duplicate a SharedMemoryHandle. On POSIX, a sandboxed process typically calls
dup(). I am updating the mechanism for SharedMemory on Mac to use Mach
primitives, which will require yet another method for passing
SharedMemoryHandles between unprivileged processes.
This CL adds a new method content::BrokerDuplicateSharedMemoryHandle, whose
implementation will call content::BrokerDuplicateHandle on Windows, dup() on
Linux, and some appropriate IPC on Mac. For now, the Mac implementation also
uses dup(). This solution has two benefits:
- It can be easily extended to support a Mach based Mechanism for duplicating
SharedMemoryHandles.
- It extracts duplicated, cross-platform code from several locations.
BUG=466437
Committed: https://crrev.com/89ca3adb35bd9a610045344e97402b355dcb9564
Cr-Commit-Position: refs/heads/master@{#332553}
Patch Set 1 #Patch Set 2 : #Patch Set 3 : Rename method. #
Total comments: 2
Patch Set 4 : Rebase against top of tree. #Patch Set 5 : Comments from rsesek. #Patch Set 6 : Rebase. #Patch Set 7 : Don't declare or define BrokerDuplicateSharedMemoryHandle() on Linux. #Patch Set 8 : Pass SharedMemoryHandle by const ref. #
Messages
Total messages: 27 (15 generated)
|