| Index: ipc/ipc_message_utils.cc
|
| diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
|
| index 52137e22da57d4a8c297fa97bfbc4c460490e7f7..7f56bb2f0e8a584cdf3113c4bda8dc9ab770dc8b 100644
|
| --- a/ipc/ipc_message_utils.cc
|
| +++ b/ipc/ipc_message_utils.cc
|
| @@ -778,7 +778,7 @@ void ParamTraits<base::SharedMemoryHandle>::Write(base::Pickle* m,
|
|
|
| // If the caller intended to pass ownership to the IPC stack, release a
|
| // reference.
|
| - if (p.OwnershipPassesToIPC())
|
| + if (p.OwnershipPassesToIPC() && p.BelongsToCurrentProcess())
|
| p.Close();
|
| } else {
|
| m->WriteInt(HandleToLong(p.GetHandle()));
|
|
|