Chromium Code Reviews| Index: base/memory/shared_memory.h |
| diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h |
| index aa36768721e4203f050be292c979d35604a8578f..f68c861647c88c1c5ccc280063cecd8a7cf6c05c 100644 |
| --- a/base/memory/shared_memory.h |
| +++ b/base/memory/shared_memory.h |
| @@ -192,6 +192,13 @@ class BASE_EXPORT SharedMemory { |
| // identifier is not portable. |
| SharedMemoryHandle handle() const; |
| + // Returns the underlying OS handle for this segment. The caller also gets |
| + // ownership of the handle. This is logically equivalent to: |
| + // SharedMemoryHandle dup = DuplicateHandle(handle()); |
| + // Close(); |
| + // return dup; |
| + SharedMemoryHandle TakeHandle(); |
|
Nico
2016/11/14 18:53:51
make this WARN_UNUSED_RESULT
|
| + |
| // Closes the open shared memory segment. The memory will remain mapped if |
| // it was previously mapped. |
| // It is safe to call Close repeatedly. |