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

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: Comments from mseaborn. 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
« no previous file with comments | « content/common/sandbox_util.cc ('k') | ipc/ipc_platform_file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.cc
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 29fa0382546d0210158a3b9cfaae9ca6c73c4edb..2420bdb1f1aac600b9937e025b364358c6b9702d 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -780,7 +780,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()));
« no previous file with comments | « content/common/sandbox_util.cc ('k') | ipc/ipc_platform_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698