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

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

Issue 82033002: Always create FrameTreeNodes and RenderFrameHosts for every frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix two bugs with slow/crashed renderers; add tests Created 7 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/frame_tree_node.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index ce357750443542d1ea3f4f1380313d6196b111e1..0d77618a729efc248dacd4799b72c7fb1cfc524e 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -56,11 +56,13 @@ void FrameTreeNode::RemoveChild(FrameTreeNode* child) {
void FrameTreeNode::ResetForMainFrame(
RenderFrameHostImpl* new_render_frame_host) {
- DCHECK_EQ(0UL, children_.size());
-
owns_render_frame_host_ = false;
frame_id_ = kInvalidFrameId;
current_url_ = GURL();
+
+ // The children may not have been cleared if a cross-process navigation
+ // commits before the old process cleans everything up. Make sure the child
+ // nodes get deleted.
children_.clear();
render_frame_host_ = new_render_frame_host;

Powered by Google App Engine
This is Rietveld 408576698