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

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

Issue 459613007: Fix for renderer visibility on Android that doesn't break Aura and Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4cf3d03a075fc6ec12ef12785cf345281597bb78..df99c91977c538699099a62f0ad60a85a9fb9597 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1198,6 +1198,18 @@ void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status,
// Reset some fields in preparation for recovering from a crash.
ResetSizeAndRepaintPendingFlags();
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.
+ //
+ // 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;
+ }
// Reset this to ensure the hung renderer mechanism is working properly.
in_flight_event_count_ = 0;
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698