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

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

Issue 660093003: Detach RemoteFrame from the tree when deleting RenderFrameProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused variable. Created 6 years, 2 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 | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_proxy_host.cc
diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
index 6f502f61e8bb006f4d2e2723b8700446367ce71a..44bedf7ba0b33e8011cb2e9a78fe24de8080c474 100644
--- a/content/browser/frame_host/render_frame_proxy_host.cc
+++ b/content/browser/frame_host/render_frame_proxy_host.cc
@@ -68,8 +68,14 @@ RenderFrameProxyHost::RenderFrameProxyHost(SiteInstance* site_instance,
}
RenderFrameProxyHost::~RenderFrameProxyHost() {
- if (GetProcess()->HasConnection())
- Send(new FrameMsg_DeleteProxy(routing_id_));
+ if (GetProcess()->HasConnection()) {
+ // TODO(nasko): For now, don't send this IPC for top-level frames, as
+ // the top-level RenderFrame will delete the RenderFrameProxy.
+ // This can be removed once we don't have a swapped out state on
+ // RenderFrame. See https://crbug.com/357747
+ if (!frame_tree_node_->IsMainFrame())
+ Send(new FrameMsg_DeleteProxy(routing_id_));
+ }
GetProcess()->RemoveRoute(routing_id_);
g_routing_id_frame_proxy_map.Get().erase(
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698