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

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

Issue 2847033003: Get rid of SharedMemory::GiveToProcess. (Closed)
Patch Set: Comments from avi. Created 3 years, 8 months 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/browser/renderer_host/render_message_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/ppb_image_data_impl.cc
diff --git a/content/renderer/pepper/ppb_image_data_impl.cc b/content/renderer/pepper/ppb_image_data_impl.cc
index ad34718793f8950200f4a24fa4104da4d12711dc..95af2c0683143768800f10aaeb57b5040e3efad3 100644
--- a/content/renderer/pepper/ppb_image_data_impl.cc
+++ b/content/renderer/pepper/ppb_image_data_impl.cc
@@ -147,8 +147,10 @@ bool ImageDataPlatformBackend::Init(PPB_ImageData_Impl* impl,
// The TransportDIB is always backed by shared memory, so give the shared
// memory handle to it.
- base::SharedMemoryHandle handle;
- if (!shared_memory->GiveToProcess(base::GetCurrentProcessHandle(), &handle))
+ base::SharedMemoryHandle handle = shared_memory->handle().Duplicate();
+ shared_memory->Unmap();
+ shared_memory->Close();
+ if (!handle.IsValid())
return false;
dib_.reset(TransportDIB::CreateWithHandle(handle));
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698