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

Unified Diff: ipc/ipc_channel.h

Issue 11722017: Use an explicit PID for duplicating Pepper handles rather than the Channel's. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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/renderer/render_view_pepper_helper.h ('k') | ppapi/proxy/broker_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel.h
diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h
index e86fc35fbd7b5803fac7fc1b41c587266989d72d..34f1bbab0ddae4f5b416c430214615bcb57ef715 100644
--- a/ipc/ipc_channel.h
+++ b/ipc/ipc_channel.h
@@ -129,7 +129,14 @@ class IPC_EXPORT Channel : public Sender {
void set_listener(Listener* listener);
// Get the process ID for the connected peer.
- // Returns base::kNullProcessId if the peer is not connected yet.
+ //
+ // Returns base::kNullProcessId if the peer is not connected yet. Watch out
+ // for race conditions. You can easily get a channel to another process, but
+ // if your process has not yet processed the "hello" message from the remote
+ // side, this will fail. You should either make sure calling this is either
+ // in response to a message from the remote side (which guarantees that it's
+ // been connected), or you wait for the "connected" notification on the
+ // listener.
base::ProcessId peer_pid() const;
// Send a message over the Channel to the listener on the other end.
« no previous file with comments | « content/renderer/render_view_pepper_helper.h ('k') | ppapi/proxy/broker_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698