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

Unified Diff: ipc/ipc_channel_posix.cc

Issue 452021: Don't reuse the initial IPC channel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_posix.cc
===================================================================
--- ipc/ipc_channel_posix.cc (revision 33340)
+++ ipc/ipc_channel_posix.cc (working copy)
@@ -338,6 +338,16 @@
return false;
AddChannelSocket(pipe_name_, client_pipe_);
} else {
+ // Guard against inappropriate reuse of the initial IPC channel. If
+ // an IPC channel closes and someone attempts to reuse it by name, the
+ // initial channel must not be recycled here. http://crbug.com/26754.
+ static bool used_initial_channel = false;
+ if (used_initial_channel) {
+ LOG(FATAL) << "Denying attempt to reuse initial IPC channel";
+ return false;
+ }
+ used_initial_channel = true;
+
pipe_ = Singleton<base::GlobalDescriptors>()->Get(kPrimaryIPCChannel);
}
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698