diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 18:16:06 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-27 18:16:06 +0000 |
commit | 54e3dfa2e76af401751b676e6fa150499734e9e6 (patch) | |
tree | 9b0487732aeaaa36491be79936aa044b47ab8b49 /chrome/plugin | |
parent | 71572873eb78084971b4d1bdd6560f876dc2fada (diff) | |
download | chromium_src-54e3dfa2e76af401751b676e6fa150499734e9e6.zip chromium_src-54e3dfa2e76af401751b676e6fa150499734e9e6.tar.gz chromium_src-54e3dfa2e76af401751b676e6fa150499734e9e6.tar.bz2 |
Fix up SharedMemory implementation so that it is more equivalent on Windows vs Posix and enforces exclusive creates.
Clean up some naming to make it clearer what size you are getting by changing max_size to created_size.
BUG=NONE
TEST=BUILD
Review URL: http://codereview.chromium.org/4034006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r-- | chrome/plugin/command_buffer_stub.cc | 2 | ||||
-rw-r--r-- | chrome/plugin/webplugin_delegate_stub.cc | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/chrome/plugin/command_buffer_stub.cc b/chrome/plugin/command_buffer_stub.cc index 77f8e13..0be798a 100644 --- a/chrome/plugin/command_buffer_stub.cc +++ b/chrome/plugin/command_buffer_stub.cc @@ -169,7 +169,7 @@ void CommandBufferStub::OnGetTransferBuffer( Buffer buffer = command_buffer_->GetTransferBuffer(id); if (buffer.shared_memory) { buffer.shared_memory->ShareToProcess(peer_handle, transfer_buffer); - *size = buffer.shared_memory->max_size(); + *size = buffer.shared_memory->created_size(); } base::CloseProcessHandle(peer_handle); diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc index cb6af0d..5af56dd 100644 --- a/chrome/plugin/webplugin_delegate_stub.cc +++ b/chrome/plugin/webplugin_delegate_stub.cc @@ -429,11 +429,7 @@ void WebPluginDelegateStub::CreateSharedBuffer( uint32 size, base::SharedMemory* shared_buf, base::SharedMemoryHandle* remote_handle) { - if (!shared_buf->Create(std::string(), false, false, size)) { - NOTREACHED(); - return; - } - if (!shared_buf->Map(size)) { + if (!shared_buf->CreateAndMapAnonymous(size)) { NOTREACHED(); shared_buf->Close(); return; |