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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2496233003: Destroy the old RenderWidgetHostView when swapping out a main frame. (Closed)
Patch Set: Created 4 years, 1 month 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/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 4bbb482a128f7e38a442e9e70b217e17c2595a4b..cd3c836d791c0f86cabbf037f09432786e1cd409 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1513,6 +1513,11 @@ void RenderFrameHostImpl::OnSwappedOut() {
if (frame_tree_node_->IsMainFrame()) {
lfg 2016/11/15 04:37:34 This part I think it should be moved to RenderFram
Charlie Reis 2016/11/15 19:59:05 Hmm, I see the dilemma. We're basically doing the
alexmos 2016/11/17 17:55:57 Do you mean all of the things in the if, or just s
lfg 2016/11/23 00:27:04 I moved all the code to RFHM. I think it makes mor
alexmos 2016/11/23 17:54:45 Acknowledged.
render_view_host_->set_is_active(false);
render_view_host_->set_is_swapped_out(true);
+
+ if (render_view_host_->GetWidget()->GetView()) {
+ render_view_host_->GetWidget()->GetView()->Destroy();
+ render_view_host_->GetWidget()->SetView(nullptr);
+ }
}
bool deleted =

Powered by Google App Engine
This is Rietveld 408576698