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

Unified Diff: ppapi/proxy/dispatcher.cc

Issue 6493004: Implement basic crash detection and shutdown handling for out of process PPAP... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « ppapi/proxy/dispatcher.h ('k') | ppapi/proxy/host_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ppapi/proxy/dispatcher.h ('k') | ppapi/proxy/host_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698