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

Unified Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 5172009: This adds some plumbing for propagating the reason for a renderer's death (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final review changes Created 10 years 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
Index: chrome/browser/renderer_host/render_view_host.cc
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index e319e364b5cfa7905f9f90e6e78f353591bcdeb3..abb35d4cd85ae8249e16e2a260468b0470e6486b 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -139,7 +139,8 @@ RenderViewHost::RenderViewHost(SiteInstance* instance,
session_storage_namespace_(session_storage),
is_extension_process_(false),
autofill_query_id_(0),
- save_accessibility_tree_for_testing_(false) {
+ save_accessibility_tree_for_testing_(false),
+ render_view_termination_status_(base::TERMINATION_STATUS_STILL_RUNNING) {
if (!session_storage_namespace_) {
session_storage_namespace_ =
new SessionStorageNamespace(process()->profile());
@@ -993,15 +994,23 @@ void RenderViewHost::OnMsgRunModal(IPC::Message* reply_msg) {
}
void RenderViewHost::OnMsgRenderViewReady() {
+ render_view_termination_status_ = base::TERMINATION_STATUS_STILL_RUNNING;
WasResized();
delegate_->RenderViewReady(this);
}
-void RenderViewHost::OnMsgRenderViewGone() {
+void RenderViewHost::OnMsgRenderViewGone(int status, int exit_code) {
+ // Keep the termination status so we can get at it later when we
+ // need to know why it died.
+ render_view_termination_status_ =
+ static_cast<base::TerminationStatus>(status);
+
// Our base class RenderWidgetHost needs to reset some stuff.
- RendererExited();
+ RendererExited(render_view_termination_status_, exit_code);
- delegate_->RenderViewGone(this);
+ delegate_->RenderViewGone(this,
+ static_cast<base::TerminationStatus>(status),
+ exit_code);
}
// Called when the renderer navigates. For every frame loaded, we'll get this
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698