Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(830)

Unified Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 11469015: Renderer process can allocate anonymous shared memory without help from browser process on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/test/mock_render_thread.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_delegate_impl.cc
===================================================================
--- content/renderer/pepper/pepper_plugin_delegate_impl.cc (revision 172434)
+++ content/renderer/pepper/pepper_plugin_delegate_impl.cc (working copy)
@@ -1383,19 +1383,7 @@
base::SharedMemory* PepperPluginDelegateImpl::CreateAnonymousSharedMemory(
uint32_t size) {
- if (size == 0)
- return NULL;
- base::SharedMemoryHandle handle;
- if (!render_view_->Send(
- new ChildProcessHostMsg_SyncAllocateSharedMemory(size, &handle))) {
- DLOG(WARNING) << "Browser allocation request message failed";
- return NULL;
- }
- if (!base::SharedMemory::IsHandleValid(handle)) {
- DLOG(WARNING) << "Browser failed to allocate shared memory";
- return NULL;
- }
- return new base::SharedMemory(handle, false);
+ return RenderThread::Get()->HostAllocateSharedMemoryBuffer(size).release();
}
ppapi::Preferences PepperPluginDelegateImpl::GetPreferences() {
« no previous file with comments | « content/public/test/mock_render_thread.cc ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698