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

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

Issue 90413002: Ensure that child FrameTreeNodes are deleted after a navigation or crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698