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)); |