Index: chrome/renderer/pepper/pepper_shared_memory_message_filter.cc |
diff --git a/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc b/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc |
index 9919fb47b03ff0f36d660633f5d5da01e63681f4..8b708238b981dfd5cbfea55299e6ac65e19a8077 100644 |
--- a/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc |
+++ b/chrome/renderer/pepper/pepper_shared_memory_message_filter.cc |
@@ -49,8 +49,9 @@ void PepperSharedMemoryMessageFilter::OnHostMsgCreateSharedMemory( |
if (!shm.get()) |
return; |
- base::SharedMemoryHandle host_shm_handle; |
- shm->ShareToProcess(base::GetCurrentProcessHandle(), &host_shm_handle); |
+ // TODO(erikchen): This appears to sometimes leak the SharedMemoryHandle. |
+ // https://crbug.com/640840. |
+ base::SharedMemoryHandle host_shm_handle = shm->handle().Duplicate(); |
*host_handle_id = |
content::PepperPluginInstance::Get(instance) |
->GetVarTracker() |