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

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

Issue 613173004: Move notifications to after the process has indeed closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | 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 a95102ffcad20f3a2f8bba467ca59daf86e7576e..51c14ba4203c229d87da0e0251da49d1dd9565af 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1908,6 +1908,11 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead) {
base::TERMINATION_STATUS_NORMAL_TERMINATION;
RendererClosedDetails details(GetHandle(), status, exit_code);
+ mojo_application_host_->WillDestroySoon();
+
+ child_process_launcher_.reset();
+ channel_.reset();
+
within_process_died_observer_ = true;
NotificationService::current()->Notify(
NOTIFICATION_RENDERER_PROCESS_CLOSED,
@@ -1918,10 +1923,6 @@ 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;
message_port_message_filter_ = NULL;
RemoveUserData(kSessionStorageHolderKey);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698