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

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: Renaming PROCESS_END_* to EXIT_CODE_* 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 93abfc6582cc8ea94e13ebcc50cb55bc36bdc1f5..a1ef95235c8c4cf717269238147d4d8933e79643 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

Powered by Google App Engine
This is Rietveld 408576698