summaryrefslogtreecommitdiffstats
path: root/content/browser/utility_process_host_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/utility_process_host_impl.cc')
-rw-r--r--content/browser/utility_process_host_impl.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc
index 1a1b942..16a42d6 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -268,15 +268,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,
@@ -284,6 +292,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(),