Index: content/browser/renderer_host/render_process_host_impl.cc |
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc |
index 9197d0ef769f132d3cae9633147f8e11e9effc8c..0d92caa9a6a1a89e1fe35beb1e6ac13457d18724 100644 |
--- a/content/browser/renderer_host/render_process_host_impl.cc |
+++ b/content/browser/renderer_host/render_process_host_impl.cc |
@@ -922,8 +922,7 @@ void RenderProcessHostImpl::NotifyTimezoneChange() { |
} |
ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() { |
- if (!mojo_application_host_) |
- return NULL; |
+ DCHECK(mojo_application_host_); |
return mojo_application_host_->service_registry(); |
} |
@@ -1921,6 +1920,8 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead) { |
RenderProcessExited(this, GetHandle(), status, exit_code)); |
within_process_died_observer_ = false; |
+ mojo_application_host_->WillDestroySoon(); |
+ |
child_process_launcher_.reset(); |
channel_.reset(); |
gpu_message_filter_ = NULL; |
@@ -2023,6 +2024,8 @@ void RenderProcessHostImpl::OnShutdownRequest() { |
Source<RenderProcessHost>(this), |
NotificationService::NoDetails()); |
+ mojo_application_host_->WillDestroySoon(); |
+ |
Send(new ChildProcessMsg_Shutdown()); |
} |