Index: content/common/child_process_host_impl.cc |
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc |
index 42f368d0ed1272b3ac7b67c529fbc6e19ab07e12..529cc77b64b0dc9f1a30bb00c3dfa9911769249a 100644 |
--- a/content/common/child_process_host_impl.cc |
+++ b/content/common/child_process_host_impl.cc |
@@ -192,7 +192,7 @@ bool ChildProcessHostImpl::Send(IPC::Message* message) { |
} |
void ChildProcessHostImpl::AllocateSharedMemory( |
- size_t buffer_size, base::ProcessHandle child_process_handle, |
+ size_t buffer_size, |
base::SharedMemoryHandle* shared_memory_handle) { |
base::SharedMemory shared_buf; |
if (!shared_buf.CreateAnonymous(buffer_size)) { |
@@ -200,7 +200,7 @@ void ChildProcessHostImpl::AllocateSharedMemory( |
NOTREACHED() << "Cannot create shared memory buffer"; |
return; |
} |
- shared_buf.GiveToProcess(child_process_handle, shared_memory_handle); |
+ *shared_memory_handle = shared_buf.TakeHandle(); |
} |
int ChildProcessHostImpl::GenerateChildProcessUniqueId() { |
@@ -316,7 +316,7 @@ void ChildProcessHostImpl::OnBadMessageReceived(const IPC::Message& message) { |
void ChildProcessHostImpl::OnAllocateSharedMemory( |
uint32_t buffer_size, |
base::SharedMemoryHandle* handle) { |
- AllocateSharedMemory(buffer_size, peer_process_.Handle(), handle); |
+ AllocateSharedMemory(buffer_size, handle); |
} |
void ChildProcessHostImpl::OnShutdownRequest() { |
@@ -338,7 +338,7 @@ void ChildProcessHostImpl::OnAllocateGpuMemoryBuffer( |
// sure |usage| is supported here. |
if (gpu::GpuMemoryBufferImplSharedMemory::IsUsageSupported(usage)) { |
*handle = gpu::GpuMemoryBufferImplSharedMemory::AllocateForChildProcess( |
- id, gfx::Size(width, height), format, peer_process_.Handle()); |
+ id, gfx::Size(width, height), format); |
} |
} |