Index: content/browser/utility_process_host_impl.cc |
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc |
index ddc41a74131328ef6f3bb83d0799d1341f52b2c2..a72d604c6b4adb5e20a76b1d3f5c4d98dd0b9596 100644 |
--- a/content/browser/utility_process_host_impl.cc |
+++ b/content/browser/utility_process_host_impl.cc |
@@ -267,15 +267,23 @@ bool UtilityProcessHostImpl::StartProcess() { |
} |
bool UtilityProcessHostImpl::OnMessageReceived(const IPC::Message& message) { |
+ if (!client_) |
+ return true; |
+ |
client_task_runner_->PostTask( |
FROM_HERE, |
- base::Bind(base::IgnoreResult( |
- &UtilityProcessHostClient::OnMessageReceived), client_.get(), |
+ base::Bind( |
+ base::IgnoreResult(&UtilityProcessHostClient::OnMessageReceived), |
+ client_.get(), |
message)); |
+ |
return true; |
} |
void UtilityProcessHostImpl::OnProcessLaunchFailed() { |
+ if (!client_) |
+ return; |
+ |
client_task_runner_->PostTask( |
FROM_HERE, |
base::Bind(&UtilityProcessHostClient::OnProcessLaunchFailed, |
@@ -283,6 +291,9 @@ void UtilityProcessHostImpl::OnProcessLaunchFailed() { |
} |
void UtilityProcessHostImpl::OnProcessCrashed(int exit_code) { |
+ if (!client_) |
+ return; |
+ |
client_task_runner_->PostTask( |
FROM_HERE, |
base::Bind(&UtilityProcessHostClient::OnProcessCrashed, client_.get(), |