summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskaslev@chromium.org <skaslev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-13 09:46:58 +0000
committerskaslev@chromium.org <skaslev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-13 09:46:58 +0000
commite607e2c17c4f64a0c0be413951ea97ed327c747f (patch)
tree5cf5cf3fceddd728dd829e8ee767506ad091ea9e
parent40b419f07d4d3ee4c16093bc06f3cdd115afe5ee (diff)
downloadchromium_src-e607e2c17c4f64a0c0be413951ea97ed327c747f.zip
chromium_src-e607e2c17c4f64a0c0be413951ea97ed327c747f.tar.gz
chromium_src-e607e2c17c4f64a0c0be413951ea97ed327c747f.tar.bz2
On renderer shared memory allocation requests, create a new shared buffer
and pass a duplicated handle back to the renderer without mapping it in the browser process. Currently we map each newly created shared memory buffer in the browser process and then immediately unmap it before passing it back to the renderer. R=cevans,michaeln Review URL: https://chromiumcodereview.appspot.com/23566020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223016 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/common/child_process_host_impl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index 8b022e5..fb058d3 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -200,9 +200,9 @@ void ChildProcessHostImpl::AllocateSharedMemory(
size_t buffer_size, base::ProcessHandle child_process_handle,
base::SharedMemoryHandle* shared_memory_handle) {
base::SharedMemory shared_buf;
- if (!shared_buf.CreateAndMapAnonymous(buffer_size)) {
+ if (!shared_buf.CreateAnonymous(buffer_size)) {
*shared_memory_handle = base::SharedMemory::NULLHandle();
- NOTREACHED() << "Cannot map shared memory buffer";
+ NOTREACHED() << "Cannot create shared memory buffer";
return;
}
shared_buf.GiveToProcess(child_process_handle, shared_memory_handle);