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

Unified Diff: ipc/ipc_channel.cc

Issue 879303004: Non-SFI mode: Use dummy PID for NaCl's IPC channel for nacl_helper_nonsfi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel.cc
diff --git a/ipc/ipc_channel.cc b/ipc/ipc_channel.cc
index 4a4e40ddc1fb82bfa2bbeeff49cf0917b252ef7a..ac09c5ab1ef1d00b31c4f3a2e7b0a260673dbfbe 100644
--- a/ipc/ipc_channel.cc
+++ b/ipc/ipc_channel.cc
@@ -28,8 +28,13 @@ std::string Channel::GenerateUniqueRandomChannelID() {
// the creator, an identifier for the child instance, and a strong random
// component. The strong random component prevents other processes from
// hijacking or squatting on predictable channel names.
-
+#if defined(OS_NACL_NONSFI)
+ // The seccomp sandbox disallows use of getpid(), so we provide a
+ // dummy PID.
+ int process_id = -1;
+#else
int process_id = base::GetCurrentProcId();
+#endif
return base::StringPrintf("%d.%u.%d",
process_id,
g_last_id.GetNext(),
« no previous file with comments | « no previous file | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698