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

Unified Diff: ipc/ipc_message_utils.cc

Issue 1830853002: Make PlatformFileForTransit a class on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 4 years, 9 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
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()));

Powered by Google App Engine
This is Rietveld 408576698