summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
authoravi <avi@chromium.org>2015-05-14 11:22:56 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-14 18:23:06 +0000
commit021157eba5bf70b77d337796832ce99347248c80 (patch)
tree56f3cf0c5e8f536e5c82d9d7957a2eeb6f81580b /content/browser
parent7ecbfa316b3434fd0db181beefacc068e41d158b (diff)
downloadchromium_src-021157eba5bf70b77d337796832ce99347248c80.zip
chromium_src-021157eba5bf70b77d337796832ce99347248c80.tar.gz
chromium_src-021157eba5bf70b77d337796832ce99347248c80.tar.bz2
Dying RenderProcessHostImpls should not send observer notifications.
BUG=487689 TEST=these crashes stop Review URL: https://codereview.chromium.org/1139943003 Cr-Commit-Position: refs/heads/master@{#329879}
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 1607d0b..f10d0c1 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2319,6 +2319,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);