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

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

Issue 1134273002: Band-aid fix for bug 487406 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak Created 5 years, 7 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/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 int32 site_instance_id, 930 int32 site_instance_id,
931 FrameTreeNode* node) { 931 FrameTreeNode* node) {
932 RenderFrameProxyHostMap::iterator iter = 932 RenderFrameProxyHostMap::iterator iter =
933 node->render_manager()->proxy_hosts_.find(site_instance_id); 933 node->render_manager()->proxy_hosts_.find(site_instance_id);
934 if (iter != node->render_manager()->proxy_hosts_.end()) { 934 if (iter != node->render_manager()->proxy_hosts_.end()) {
935 RenderFrameProxyHost* proxy = iter->second; 935 RenderFrameProxyHost* proxy = iter->second;
936 // Delete the proxy. If it is for a main frame (and thus the RFH is stored 936 // Delete the proxy. If it is for a main frame (and thus the RFH is stored
937 // in the proxy) and it was still pending swap out, move the RFH to the 937 // in the proxy) and it was still pending swap out, move the RFH to the
938 // pending deletion list first. 938 // pending deletion list first.
939 if (node->IsMainFrame() && 939 if (node->IsMainFrame() &&
940 proxy->render_frame_host() &&
nasko 2015/05/14 14:09:00 Funny enough, I had this exact change in my CL to
940 proxy->render_frame_host()->rfh_state() == 941 proxy->render_frame_host()->rfh_state() ==
941 RenderFrameHostImpl::STATE_PENDING_SWAP_OUT) { 942 RenderFrameHostImpl::STATE_PENDING_SWAP_OUT) {
942 scoped_ptr<RenderFrameHostImpl> swapped_out_rfh = 943 scoped_ptr<RenderFrameHostImpl> swapped_out_rfh =
943 proxy->PassFrameHostOwnership(); 944 proxy->PassFrameHostOwnership();
944 node->render_manager()->MoveToPendingDeleteHosts(swapped_out_rfh.Pass()); 945 node->render_manager()->MoveToPendingDeleteHosts(swapped_out_rfh.Pass());
945 } 946 }
946 delete proxy; 947 delete proxy;
947 node->render_manager()->proxy_hosts_.erase(site_instance_id); 948 node->render_manager()->proxy_hosts_.erase(site_instance_id);
948 } 949 }
949 950
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
2118 void RenderFrameHostManager::DeleteRenderFrameProxyHost( 2119 void RenderFrameHostManager::DeleteRenderFrameProxyHost(
2119 SiteInstance* instance) { 2120 SiteInstance* instance) {
2120 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); 2121 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId());
2121 if (iter != proxy_hosts_.end()) { 2122 if (iter != proxy_hosts_.end()) {
2122 delete iter->second; 2123 delete iter->second;
2123 proxy_hosts_.erase(iter); 2124 proxy_hosts_.erase(iter);
2124 } 2125 }
2125 } 2126 }
2126 2127
2127 } // namespace content 2128 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698