| Index: ppapi/proxy/dispatcher.cc
|
| ===================================================================
|
| --- ppapi/proxy/dispatcher.cc (revision 74733)
|
| +++ ppapi/proxy/dispatcher.cc (working copy)
|
| @@ -151,8 +151,7 @@
|
|
|
| Dispatcher::Dispatcher(base::ProcessHandle remote_process_handle,
|
| GetInterfaceFunc local_get_interface)
|
| - : pp_module_(0),
|
| - remote_process_handle_(remote_process_handle),
|
| + : remote_process_handle_(remote_process_handle),
|
| test_sink_(NULL),
|
| disallow_trusted_interfaces_(false), // TODO(brettw) make this settable.
|
| local_get_interface_(local_get_interface),
|
| @@ -192,6 +191,10 @@
|
| return false;
|
| }
|
|
|
| +void Dispatcher::OnChannelError() {
|
| + channel_.reset();
|
| +}
|
| +
|
| // static
|
| const InterfaceProxy::Info* Dispatcher::GetPPBInterfaceInfo(
|
| const std::string& name) {
|
| @@ -242,7 +245,12 @@
|
| bool Dispatcher::Send(IPC::Message* msg) {
|
| if (test_sink_)
|
| return test_sink_->Send(msg);
|
| - return channel_->Send(msg);
|
| + if (channel_.get())
|
| + return channel_->Send(msg);
|
| +
|
| + // Remote side crashed, drop this message.
|
| + delete msg;
|
| + return false;
|
| }
|
|
|
| } // namespace proxy
|
|
|