summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/broker_dispatcher.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-04 20:46:54 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-04 20:46:54 +0000
commit108fd342d9f7e0d2073245d1d52cc21ee8253252 (patch)
tree9b9b68a0e991d1585b4f6a05c6ba97ddf74040b0 /ppapi/proxy/broker_dispatcher.cc
parentc494d08784a4a733765a98dc726668ed9f32b4db (diff)
downloadchromium_src-108fd342d9f7e0d2073245d1d52cc21ee8253252.zip
chromium_src-108fd342d9f7e0d2073245d1d52cc21ee8253252.tar.gz
chromium_src-108fd342d9f7e0d2073245d1d52cc21ee8253252.tar.bz2
Use an explicit PID for duplicating Pepper handles rather than the Channel's.
When the browser process launches the plugin, it explicitly tells each side the PID of the other side, and we now use this PID for sharing handles. Previously we'd use the PID from the IPC channel. Using the PID from the IPC channel creates a race condition because the PID isn't set until the "hello" message from the opposite side is processed, which isn't guaranteed at any particular time. BUG=168222 Review URL: https://codereview.chromium.org/11722017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/broker_dispatcher.cc')
-rw-r--r--ppapi/proxy/broker_dispatcher.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/ppapi/proxy/broker_dispatcher.cc b/ppapi/proxy/broker_dispatcher.cc
index 97fca5c..7187852 100644
--- a/ppapi/proxy/broker_dispatcher.cc
+++ b/ppapi/proxy/broker_dispatcher.cc
@@ -21,9 +21,11 @@ BrokerDispatcher::~BrokerDispatcher() {
bool BrokerDispatcher::InitBrokerWithChannel(
ProxyChannel::Delegate* delegate,
+ base::ProcessId peer_pid,
const IPC::ChannelHandle& channel_handle,
bool is_client) {
- return ProxyChannel::InitWithChannel(delegate, channel_handle, is_client);
+ return ProxyChannel::InitWithChannel(delegate, peer_pid, channel_handle,
+ is_client);
}
bool BrokerDispatcher::OnMessageReceived(const IPC::Message& msg) {