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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 472603002: Mojo: Add the ability to notify a Mojo Channel that it's going to be destroyed soon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment fix Created 6 years, 4 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 | « content/browser/mojo/mojo_application_host.cc ('k') | mojo/embedder/channel_init.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « content/browser/mojo/mojo_application_host.cc ('k') | mojo/embedder/channel_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698