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 38f4192c62ab9c49290126814c0db5313c88ade3..21e0ecbd32e2eccb9c1ebd0bdf80e407ea658da9 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -184,6 +184,10 @@ RenderFrameHostImpl::~RenderFrameHostImpl() { |
g_routing_id_frame_map.Get().erase( |
RenderFrameHostID(GetProcess()->GetID(), routing_id_)); |
+ // Notify the FrameTree that this RFH is going away, allowing it to shut down |
+ // the corresponding RenderViewHost if it is no longer needed. |
+ frame_tree_->UnregisterRenderFrameHost(this); |
Charlie Reis
2015/03/02 18:38:25
Moving this makes me nervous about UaFs. Are we s
nasko
2015/03/02 19:30:53
I don't know if observers will need to access Rend
Charlie Reis
2015/03/02 22:44:30
Yes, that's my concern, though.
I just looked mor
Charlie Reis
2015/03/02 22:58:49
Oops, this didn't come up in the patch diffs, so I
|
+ |
if (delegate_ && render_frame_created_) |
delegate_->RenderFrameDeleted(this); |
@@ -194,10 +198,6 @@ RenderFrameHostImpl::~RenderFrameHostImpl() { |
if (IsRFHStateActive(rfh_state_)) |
GetSiteInstance()->decrement_active_frame_count(); |
- // Notify the FrameTree that this RFH is going away, allowing it to shut down |
- // the corresponding RenderViewHost if it is no longer needed. |
- frame_tree_->UnregisterRenderFrameHost(this); |
- |
// NULL out the swapout timer; in crash dumps this member will be null only if |
// the dtor has run. |
swapout_event_monitor_timeout_.reset(); |