Index: mojo/edk/embedder/platform_shared_buffer.cc |
diff --git a/mojo/edk/embedder/platform_shared_buffer.cc b/mojo/edk/embedder/platform_shared_buffer.cc |
index 514cbeb523f9441a34d23cf96f967577e4139d06..a6121503f244ee02bfd1d05538163d6721a43ef6 100644 |
--- a/mojo/edk/embedder/platform_shared_buffer.cc |
+++ b/mojo/edk/embedder/platform_shared_buffer.cc |
@@ -204,13 +204,11 @@ PlatformSharedBuffer* PlatformSharedBuffer::CreateReadOnlyDuplicate() { |
} |
base::SharedMemoryHandle handle; |
- bool success; |
{ |
base::AutoLock locker(lock_); |
- success = shared_memory_->ShareReadOnlyToProcess( |
- base::GetCurrentProcessHandle(), &handle); |
+ handle = shared_memory_->GetReadOnlyHandle(); |
} |
- if (!success || !handle.IsValid()) |
+ if (!handle.IsValid()) |
return nullptr; |
return CreateFromSharedMemoryHandle(num_bytes_, true, handle); |