| Index: content/child/child_thread_impl.cc
|
| diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
|
| index dbf6c3be0c2d5c13d2029ae0554bf191ce8b443f..86ee1f6fe0ae5e43ff9f473b7ceffb8989b51131 100644
|
| --- a/content/child/child_thread_impl.cc
|
| +++ b/content/child/child_thread_impl.cc
|
| @@ -569,18 +569,11 @@ scoped_ptr<base::SharedMemory> ChildThreadImpl::AllocateSharedMemory(
|
| size_t buf_size,
|
| IPC::Sender* sender) {
|
| scoped_ptr<base::SharedMemory> shared_buf;
|
| -#if defined(OS_WIN)
|
| - shared_buf.reset(new base::SharedMemory);
|
| - if (!shared_buf->CreateAnonymous(buf_size)) {
|
| - NOTREACHED();
|
| - return nullptr;
|
| - }
|
| -#else
|
| - // On POSIX, we need to ask the browser to create the shared memory for us,
|
| - // since this is blocked by the sandbox.
|
| + // Ask the browser to create the shared memory, since this is blocked by the
|
| + // sandbox on most platforms.
|
| base::SharedMemoryHandle shared_mem_handle;
|
| if (sender->Send(new ChildProcessHostMsg_SyncAllocateSharedMemory(
|
| - buf_size, &shared_mem_handle))) {
|
| + buf_size, &shared_mem_handle))) {
|
| if (base::SharedMemory::IsHandleValid(shared_mem_handle)) {
|
| shared_buf.reset(new base::SharedMemory(shared_mem_handle, false));
|
| } else {
|
| @@ -591,7 +584,6 @@ scoped_ptr<base::SharedMemory> ChildThreadImpl::AllocateSharedMemory(
|
| // Send is allowed to fail during shutdown. Return null in this case.
|
| return nullptr;
|
| }
|
| -#endif
|
| return shared_buf;
|
| }
|
|
|
|
|