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

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

Issue 1308623003: Assume crashed RenderWidgetHost to be invisible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check dest_render_frame_host->render_view_host()->is_hidden() Created 5 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
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 8b726e5fd4f291cc11ef6585eda4a1c034485850..53d0a1517baa0fddce256d97954d54310f7aa5d3 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1237,15 +1237,16 @@ void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status,
current_size_.SetSize(0, 0);
// After the renderer crashes, the view is destroyed and so the
// RenderWidgetHost cannot track its visibility anymore. We assume such
- // RenderWidgetHost to be visible for the sake of internal accounting - be
- // careful about changing this - see http://crbug.com/401859.
+ // RenderWidgetHost to be invisible for the sake of internal accounting - be
+ // careful about changing this - see http://crbug.com/401859 and
+ // http://crbug.com/522795.
//
// We need to at least make sure that the RenderProcessHost is notified about
// the |is_hidden_| change, so that the renderer will have correct visibility
// set when respawned.
- if (is_hidden_) {
- process_->WidgetRestored();
- is_hidden_ = false;
+ if (!is_hidden_) {
+ process_->WidgetHidden();
+ is_hidden_ = true;
}
// Reset this to ensure the hung renderer mechanism is working properly.
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698