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

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

Issue 1139943003: Dying RenderProcessHostImpls should not send observer notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 a7141e4fc77eff52db504473ea70d0c81cd4cf30..6abd214cd56d4b9f94b4d96213c65a38639fc1a0 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2320,6 +2320,12 @@ void RenderProcessHostImpl::OnProcessLaunched() {
}
void RenderProcessHostImpl::OnProcessLaunchFailed() {
+ // If this object will be destructed soon, then observers have already been
+ // sent a RenderProcessHostDestroyed notification, and we must observe our
+ // contract that says that will be the last call.
+ if (deleting_soon_)
+ return;
+
RendererClosedDetails details { base::TERMINATION_STATUS_PROCESS_WAS_KILLED,
-1 };
ProcessDied(true, &details);
« 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