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

Side by Side Diff: content/browser/frame_host/frame_tree.cc

Issue 917793006: Resetting FrameTreeNode must remove child FrameTreeNodes from global map. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/frame_tree.h" 5 #include "content/browser/frame_host/frame_tree.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 // Notify observers of the frame removal. 176 // Notify observers of the frame removal.
177 RenderFrameHostImpl* render_frame_host = child->current_frame_host(); 177 RenderFrameHostImpl* render_frame_host = child->current_frame_host();
178 if (!on_frame_removed_.is_null()) { 178 if (!on_frame_removed_.is_null()) {
179 on_frame_removed_.Run(render_frame_host); 179 on_frame_removed_.Run(render_frame_host);
180 } 180 }
181 g_frame_tree_node_id_map.Get().erase(child->frame_tree_node_id()); 181 g_frame_tree_node_id_map.Get().erase(child->frame_tree_node_id());
182 parent->RemoveChild(child); 182 parent->RemoveChild(child);
183 } 183 }
184 184
185 void FrameTree::RemoveNodeFromMap(int64 frame_tree_node_id) {
186 g_frame_tree_node_id_map.Get().erase(frame_tree_node_id);
187 }
188
185 void FrameTree::CreateProxiesForSiteInstance( 189 void FrameTree::CreateProxiesForSiteInstance(
186 FrameTreeNode* source, 190 FrameTreeNode* source,
187 SiteInstance* site_instance) { 191 SiteInstance* site_instance) {
188 // Create the swapped out RVH for the new SiteInstance. This will create 192 // Create the swapped out RVH for the new SiteInstance. This will create
189 // a top-level swapped out RFH as well, which will then be wrapped by a 193 // a top-level swapped out RFH as well, which will then be wrapped by a
190 // RenderFrameProxyHost. 194 // RenderFrameProxyHost.
191 if (!source->IsMainFrame()) { 195 if (!source->IsMainFrame()) {
192 RenderViewHostImpl* render_view_host = 196 RenderViewHostImpl* render_view_host =
193 source->frame_tree()->GetRenderViewHost(site_instance); 197 source->frame_tree()->GetRenderViewHost(site_instance);
194 if (!render_view_host) { 198 if (!render_view_host) {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 rvh->Shutdown(); 329 rvh->Shutdown();
326 render_view_host_pending_shutdown_map_.erase(multi_iter); 330 render_view_host_pending_shutdown_map_.erase(multi_iter);
327 } 331 }
328 break; 332 break;
329 } 333 }
330 CHECK(render_view_host_found); 334 CHECK(render_view_host_found);
331 } 335 }
332 } 336 }
333 337
334 } // namespace content 338 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698