Index: extensions/browser/user_script_loader.cc |
diff --git a/extensions/browser/user_script_loader.cc b/extensions/browser/user_script_loader.cc |
index 6ebe496964e0d23c73c1481ea3d79ffee966d12d..c20f96a6385963bf57d01a3d9c350646bdd811cb 100644 |
--- a/extensions/browser/user_script_loader.cc |
+++ b/extensions/browser/user_script_loader.cc |
@@ -332,9 +332,8 @@ std::unique_ptr<base::SharedMemory> UserScriptLoader::Serialize( |
// Copy the pickle to shared memory. |
memcpy(shared_memory.memory(), pickle.data(), pickle.size()); |
- base::SharedMemoryHandle readonly_handle; |
- if (!shared_memory.ShareReadOnlyToProcess(base::GetCurrentProcessHandle(), |
- &readonly_handle)) |
+ base::SharedMemoryHandle readonly_handle = shared_memory.GetReadOnlyHandle(); |
+ if (!readonly_handle.IsValid()) |
return std::unique_ptr<base::SharedMemory>(); |
return base::MakeUnique<base::SharedMemory>(readonly_handle, |