Chromium Code Reviews| Index: content/renderer/pepper_plugin_delegate_impl.cc |
| diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc |
| index 56aa7b943deedb60c7ab35d4b1082ea71050ee0d..43b8fd4a50218178856d0e80c7263e408be985f7 100644 |
| --- a/content/renderer/pepper_plugin_delegate_impl.cc |
| +++ b/content/renderer/pepper_plugin_delegate_impl.cc |
| @@ -480,13 +480,21 @@ BrokerDispatcherWrapper::~BrokerDispatcherWrapper() { |
| bool BrokerDispatcherWrapper::Init( |
| base::ProcessHandle broker_process_handle, |
| const IPC::ChannelHandle& channel_handle) { |
| +if (channel_handle.name.empty()) |
|
ddorwin
2011/11/04 23:10:03
We also need to make these checks in all PpapiPlug
xhwang
2011/11/07 22:00:14
Done.
|
| + return false; |
| + |
| +#if defined(OS_POSIX) |
| + if (channel_handle.socket.fd == -1) |
| + return false; |
| +#endif |
| + |
| dispatcher_delegate_.reset(new DispatcherDelegate); |
| dispatcher_.reset( |
| new ppapi::proxy::BrokerHostDispatcher(broker_process_handle)); |
| if (!dispatcher_->InitBrokerWithChannel(dispatcher_delegate_.get(), |
| channel_handle, |
| - true)) { |
| + true)) { // is_client |
| dispatcher_.reset(); |
| dispatcher_delegate_.reset(); |
| return false; |