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

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: Apply the change to all platforms 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 91456a9d107449be3808a62875fb593fa4b58cbc..3263faa0384561cafdb541bd4ddb9162ca425fc6 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1236,15 +1236,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.

Powered by Google App Engine
This is Rietveld 408576698