OLD | NEW |
---|---|
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/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
276 if (!cross_navigation_pending_) | 276 if (!cross_navigation_pending_) |
277 return true; | 277 return true; |
278 | 278 |
279 // We should always have a pending RFH when there's a cross-process navigation | 279 // We should always have a pending RFH when there's a cross-process navigation |
280 // in progress. Sanity check this for http://crbug.com/276333. | 280 // in progress. Sanity check this for http://crbug.com/276333. |
281 CHECK(pending_render_frame_host_); | 281 CHECK(pending_render_frame_host_); |
282 | 282 |
283 // If the tab becomes unresponsive during {before}unload while doing a | 283 // If the tab becomes unresponsive during {before}unload while doing a |
284 // cross-site navigation, proceed with the navigation. (This assumes that | 284 // cross-site navigation, proceed with the navigation. (This assumes that |
285 // the pending RenderFrameHost is still responsive.) | 285 // the pending RenderFrameHost is still responsive.) |
286 if (render_frame_host_->render_view_host()->IsWaitingForUnloadACK()) { | 286 if (render_frame_host_->IsWaitingForUnloadACK()) { |
287 // The request has been started and paused while we're waiting for the | 287 // The request has been started and paused while we're waiting for the |
288 // unload handler to finish. We'll pretend that it did. The pending | 288 // unload handler to finish. We'll pretend that it did. The pending |
289 // renderer will then be swapped in as part of the usual DidNavigate logic. | 289 // renderer will then be swapped in as part of the usual DidNavigate logic. |
290 // (If the unload handler later finishes, this call will be ignored because | 290 // (If the unload handler later finishes, this call will be ignored because |
291 // the pending_nav_params_ state will already be cleaned up.) | 291 // the pending_nav_params_ state will already be cleaned up.) |
292 current_host()->OnSwappedOut(true); | 292 current_frame_host()->OnSwappedOut(); |
293 } else if (render_frame_host_->render_view_host()-> | 293 } else if (render_frame_host_->is_waiting_for_beforeunload_ack()) { |
294 is_waiting_for_beforeunload_ack()) { | |
295 // Haven't gotten around to starting the request, because we're still | 294 // Haven't gotten around to starting the request, because we're still |
296 // waiting for the beforeunload handler to finish. We'll pretend that it | 295 // waiting for the beforeunload handler to finish. We'll pretend that it |
297 // did finish, to let the navigation proceed. Note that there's a danger | 296 // did finish, to let the navigation proceed. Note that there's a danger |
298 // that the beforeunload handler will later finish and possibly return | 297 // that the beforeunload handler will later finish and possibly return |
299 // false (meaning the navigation should not proceed), but we'll ignore it | 298 // false (meaning the navigation should not proceed), but we'll ignore it |
300 // in this case because it took too long. | 299 // in this case because it took too long. |
301 if (pending_render_frame_host_->are_navigations_suspended()) { | 300 if (pending_render_frame_host_->are_navigations_suspended()) { |
302 pending_render_frame_host_->SetNavigationsSuspended( | 301 pending_render_frame_host_->SetNavigationsSuspended( |
303 false, base::TimeTicks::Now()); | 302 false, base::TimeTicks::Now()); |
304 } | 303 } |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
683 | 682 |
684 bool RenderFrameHostManager::ClearProxiesInSiteInstance( | 683 bool RenderFrameHostManager::ClearProxiesInSiteInstance( |
685 int32 site_instance_id, | 684 int32 site_instance_id, |
686 FrameTreeNode* node) { | 685 FrameTreeNode* node) { |
687 RenderFrameProxyHostMap::iterator iter = | 686 RenderFrameProxyHostMap::iterator iter = |
688 node->render_manager()->proxy_hosts_.find(site_instance_id); | 687 node->render_manager()->proxy_hosts_.find(site_instance_id); |
689 if (iter != node->render_manager()->proxy_hosts_.end()) { | 688 if (iter != node->render_manager()->proxy_hosts_.end()) { |
690 RenderFrameProxyHost* proxy = iter->second; | 689 RenderFrameProxyHost* proxy = iter->second; |
691 // If the RVH is pending swap out, it needs to switch state to | 690 // If the RVH is pending swap out, it needs to switch state to |
692 // pending shutdown. Otherwise it is deleted. | 691 // pending shutdown. Otherwise it is deleted. |
693 if (proxy->GetRenderViewHost()->rvh_state() == | 692 if (proxy->render_frame_host()->rfh_state() == |
694 RenderViewHostImpl::STATE_PENDING_SWAP_OUT) { | 693 RenderFrameHostImpl::STATE_PENDING_SWAP_OUT) { |
695 scoped_ptr<RenderFrameHostImpl> swapped_out_rfh = | 694 scoped_ptr<RenderFrameHostImpl> swapped_out_rfh = |
696 proxy->PassFrameHostOwnership(); | 695 proxy->PassFrameHostOwnership(); |
697 | 696 |
698 swapped_out_rfh->SetPendingShutdown(base::Bind( | 697 swapped_out_rfh->SetPendingShutdown(base::Bind( |
699 &RenderFrameHostManager::ClearPendingShutdownRFHForSiteInstance, | 698 &RenderFrameHostManager::ClearPendingShutdownRFHForSiteInstance, |
700 node->render_manager()->weak_factory_.GetWeakPtr(), | 699 node->render_manager()->weak_factory_.GetWeakPtr(), |
701 site_instance_id, | 700 site_instance_id, |
702 swapped_out_rfh.get())); | 701 swapped_out_rfh.get())); |
703 RFHPendingDeleteMap::iterator pending_delete_iter = | 702 RFHPendingDeleteMap::iterator pending_delete_iter = |
704 node->render_manager()->pending_delete_hosts_.find(site_instance_id); | 703 node->render_manager()->pending_delete_hosts_.find(site_instance_id); |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1217 return true; | 1216 return true; |
1218 | 1217 |
1219 // If the pending navigation is to a WebUI and the RenderView is not in a | 1218 // If the pending navigation is to a WebUI and the RenderView is not in a |
1220 // guest process, tell the RenderViewHost about any bindings it will need | 1219 // guest process, tell the RenderViewHost about any bindings it will need |
1221 // enabled. | 1220 // enabled. |
1222 if (pending_web_ui() && !render_view_host->GetProcess()->IsIsolatedGuest()) { | 1221 if (pending_web_ui() && !render_view_host->GetProcess()->IsIsolatedGuest()) { |
1223 render_view_host->AllowBindings(pending_web_ui()->GetBindings()); | 1222 render_view_host->AllowBindings(pending_web_ui()->GetBindings()); |
1224 } else { | 1223 } else { |
1225 // Ensure that we don't create an unprivileged RenderView in a WebUI-enabled | 1224 // Ensure that we don't create an unprivileged RenderView in a WebUI-enabled |
1226 // process unless it's swapped out. | 1225 // process unless it's swapped out. |
1227 if (!render_view_host->IsSwappedOut()) { | 1226 if (render_view_host->is_active()) { |
1228 CHECK(!ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 1227 CHECK(!ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
1229 render_view_host->GetProcess()->GetID())); | 1228 render_view_host->GetProcess()->GetID())); |
1230 } | 1229 } |
1231 } | 1230 } |
1232 | 1231 |
1233 return delegate_->CreateRenderViewForRenderManager(render_view_host, | 1232 return delegate_->CreateRenderViewForRenderManager(render_view_host, |
1234 opener_route_id, | 1233 opener_route_id, |
1235 proxy_routing_id, | 1234 proxy_routing_id, |
1236 for_main_frame_navigation); | 1235 for_main_frame_navigation); |
1237 } | 1236 } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1325 render_frame_host_->render_view_host()->GetView()->Show(); | 1324 render_frame_host_->render_view_host()->GetView()->Show(); |
1326 } | 1325 } |
1327 | 1326 |
1328 // If the old frame is live, swap it out now that the new frame is visible. | 1327 // If the old frame is live, swap it out now that the new frame is visible. |
1329 int32 old_site_instance_id = | 1328 int32 old_site_instance_id = |
1330 old_render_frame_host->GetSiteInstance()->GetId(); | 1329 old_render_frame_host->GetSiteInstance()->GetId(); |
1331 if (old_render_frame_host->IsRenderFrameLive()) { | 1330 if (old_render_frame_host->IsRenderFrameLive()) { |
1332 SwapOutOldPage(old_render_frame_host.get()); | 1331 SwapOutOldPage(old_render_frame_host.get()); |
1333 | 1332 |
1334 // Schedule the old frame to shut down after it swaps out, if there are no | 1333 // Schedule the old frame to shut down after it swaps out, if there are no |
1335 // other active views in its SiteInstance. | 1334 // other active frames in its SiteInstance. |
1336 if (!static_cast<SiteInstanceImpl*>( | 1335 if (!old_render_frame_host->GetSiteInstance()->active_frame_count()) { |
1337 old_render_frame_host->GetSiteInstance())->active_view_count()) { | 1336 old_render_frame_host->SetPendingShutdown(base::Bind( |
1338 old_render_frame_host->render_view_host()->SetPendingShutdown(base::Bind( | |
1339 &RenderFrameHostManager::ClearPendingShutdownRFHForSiteInstance, | 1337 &RenderFrameHostManager::ClearPendingShutdownRFHForSiteInstance, |
1340 weak_factory_.GetWeakPtr(), | 1338 weak_factory_.GetWeakPtr(), |
1341 old_site_instance_id, | 1339 old_site_instance_id, |
1342 old_render_frame_host.get())); | 1340 old_render_frame_host.get())); |
1343 } | 1341 } |
1344 } | 1342 } |
1345 | 1343 |
1346 // For top-level frames, also hide the old RenderViewHost's view. | 1344 // For top-level frames, also hide the old RenderViewHost's view. |
1347 if (is_main_frame && old_render_frame_host->render_view_host()->GetView()) | 1345 if (is_main_frame && old_render_frame_host->render_view_host()->GetView()) |
1348 old_render_frame_host->render_view_host()->GetView()->Hide(); | 1346 old_render_frame_host->render_view_host()->GetView()->Hide(); |
(...skipping 13 matching lines...) Expand all Loading... | |
1362 delegate_->NotifySwappedFromRenderManager( | 1360 delegate_->NotifySwappedFromRenderManager( |
1363 old_render_frame_host.get(), render_frame_host_.get(), is_main_frame); | 1361 old_render_frame_host.get(), render_frame_host_.get(), is_main_frame); |
1364 | 1362 |
1365 // If the old RFH is not live, just return as there is no further work to do. | 1363 // If the old RFH is not live, just return as there is no further work to do. |
1366 if (!old_render_frame_host->IsRenderFrameLive()) | 1364 if (!old_render_frame_host->IsRenderFrameLive()) |
1367 return; | 1365 return; |
1368 | 1366 |
1369 // If the old RFH is live, we are swapping it out and should keep track of | 1367 // If the old RFH is live, we are swapping it out and should keep track of |
1370 // it in case we navigate back to it, or it is waiting for the unload event | 1368 // it in case we navigate back to it, or it is waiting for the unload event |
1371 // to execute in the background. | 1369 // to execute in the background. |
1372 // TODO(creis): Swap out the subframe in --site-per-process. | 1370 // TODO(creis): Swap out the subframe in --site-per-process. |
nasko
2014/09/29 20:28:09
Does this TODO still apply? It is a bit generic an
Charlie Reis
2014/09/29 20:49:21
Yeah, sounds stale. Removed.
| |
1373 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { | 1371 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { |
1374 DCHECK(old_render_frame_host->is_swapped_out() || | 1372 DCHECK(old_render_frame_host->is_swapped_out() || |
1375 !RenderViewHostImpl::IsRVHStateActive( | 1373 !RenderFrameHostImpl::IsRFHStateActive( |
1376 old_render_frame_host->render_view_host()->rvh_state())); | 1374 old_render_frame_host->rfh_state())); |
1377 } | 1375 } |
1378 | 1376 |
1379 // If the RenderViewHost backing the RenderFrameHost is pending shutdown, | 1377 // If the RenderViewHost backing the RenderFrameHost is pending shutdown, |
1380 // the RenderFrameHost should be put in the map of RenderFrameHosts pending | 1378 // the RenderFrameHost should be put in the map of RenderFrameHosts pending |
1381 // shutdown. Otherwise, it is stored in the map of proxy hosts. | 1379 // shutdown. Otherwise, it is stored in the map of proxy hosts. |
1382 if (old_render_frame_host->render_view_host()->rvh_state() == | 1380 if (old_render_frame_host->rfh_state() == |
1383 RenderViewHostImpl::STATE_PENDING_SHUTDOWN) { | 1381 RenderFrameHostImpl::STATE_PENDING_SHUTDOWN) { |
1384 // The proxy for this RenderFrameHost is created when sending the | 1382 // The proxy for this RenderFrameHost is created when sending the |
1385 // SwapOut message, so check if it already exists and delete it. | 1383 // SwapOut message, so check if it already exists and delete it. |
1386 RenderFrameProxyHostMap::iterator iter = | 1384 RenderFrameProxyHostMap::iterator iter = |
1387 proxy_hosts_.find(old_site_instance_id); | 1385 proxy_hosts_.find(old_site_instance_id); |
1388 if (iter != proxy_hosts_.end()) { | 1386 if (iter != proxy_hosts_.end()) { |
1389 delete iter->second; | 1387 delete iter->second; |
1390 proxy_hosts_.erase(iter); | 1388 proxy_hosts_.erase(iter); |
1391 } | 1389 } |
1392 RFHPendingDeleteMap::iterator pending_delete_iter = | 1390 RFHPendingDeleteMap::iterator pending_delete_iter = |
1393 pending_delete_hosts_.find(old_site_instance_id); | 1391 pending_delete_hosts_.find(old_site_instance_id); |
1394 if (pending_delete_iter == pending_delete_hosts_.end() || | 1392 if (pending_delete_iter == pending_delete_hosts_.end() || |
1395 pending_delete_iter->second.get() != old_render_frame_host) { | 1393 pending_delete_iter->second.get() != old_render_frame_host) { |
1396 pending_delete_hosts_[old_site_instance_id] = | 1394 pending_delete_hosts_[old_site_instance_id] = |
1397 linked_ptr<RenderFrameHostImpl>(old_render_frame_host.release()); | 1395 linked_ptr<RenderFrameHostImpl>(old_render_frame_host.release()); |
1398 } | 1396 } |
1399 } else { | 1397 } else { |
1400 CHECK(proxy_hosts_.find(render_frame_host_->GetSiteInstance()->GetId()) == | 1398 CHECK(proxy_hosts_.find(render_frame_host_->GetSiteInstance()->GetId()) == |
1401 proxy_hosts_.end()); | 1399 proxy_hosts_.end()); |
1402 | 1400 |
1403 // Capture the active view count on the old RFH SiteInstance, since the | 1401 // Capture the active frame count on the old RFH SiteInstance, since the |
1404 // ownership might be passed into the proxy and the pointer will be | 1402 // ownership might be passed into the proxy and the pointer will be |
1405 // invalid. | 1403 // invalid. |
1406 int active_view_count = | 1404 int active_frame_count = |
1407 static_cast<SiteInstanceImpl*>(old_render_frame_host->GetSiteInstance()) | 1405 old_render_frame_host->GetSiteInstance()->active_frame_count(); |
1408 ->active_view_count(); | |
1409 | 1406 |
1410 if (is_main_frame) { | 1407 if (is_main_frame) { |
1411 RenderFrameProxyHostMap::iterator iter = | 1408 RenderFrameProxyHostMap::iterator iter = |
1412 proxy_hosts_.find(old_site_instance_id); | 1409 proxy_hosts_.find(old_site_instance_id); |
1413 CHECK(iter != proxy_hosts_.end()); | 1410 CHECK(iter != proxy_hosts_.end()); |
1414 iter->second->TakeFrameHostOwnership(old_render_frame_host.Pass()); | 1411 iter->second->TakeFrameHostOwnership(old_render_frame_host.Pass()); |
1415 } | 1412 } |
1416 | 1413 |
1417 // If there are no active views in this SiteInstance, it means that | 1414 // If there are no active frames in this SiteInstance, it means that |
1418 // this RFH was the last active one in the SiteInstance. Now that we | 1415 // this RFH was the last active one in the SiteInstance. Now that we |
1419 // know that all RFHs are swapped out, we can delete all the RFPHs and | 1416 // know that all RFHs are swapped out, we can delete all the RFPHs and |
1420 // RVHs in this SiteInstance. | 1417 // RVHs in this SiteInstance. |
1421 if (!active_view_count) { | 1418 if (!active_frame_count) { |
1422 ShutdownRenderFrameProxyHostsInSiteInstance(old_site_instance_id); | 1419 ShutdownRenderFrameProxyHostsInSiteInstance(old_site_instance_id); |
1423 } else { | 1420 } |
1424 // If this is a subframe, it should have a CrossProcessFrameConnector | 1421 } |
1425 // created already and we just need to link it to the proper view in the | 1422 |
1426 // new process. | 1423 // If this is a subframe, it should have a CrossProcessFrameConnector |
Charlie Reis
2014/09/29 16:52:57
In its old location, this block wasn't updating th
nasko
2014/09/29 20:28:09
Good catch! It looks like CrossSiteIframe is indee
| |
1427 if (!is_main_frame) { | 1424 // created already and we just need to link it to the proper view in the |
1428 RenderFrameProxyHost* proxy = GetProxyToParent(); | 1425 // new process. |
1429 if (proxy) { | 1426 if (!is_main_frame) { |
1430 proxy->SetChildRWHView( | 1427 RenderFrameProxyHost* proxy = GetProxyToParent(); |
1431 render_frame_host_->render_view_host()->GetView()); | 1428 if (proxy) { |
1432 } | 1429 proxy->SetChildRWHView( |
1433 } | 1430 render_frame_host_->render_view_host()->GetView()); |
1434 } | 1431 } |
1435 } | 1432 } |
1436 } | 1433 } |
1437 | 1434 |
1438 void RenderFrameHostManager::ShutdownRenderFrameProxyHostsInSiteInstance( | 1435 void RenderFrameHostManager::ShutdownRenderFrameProxyHostsInSiteInstance( |
1439 int32 site_instance_id) { | 1436 int32 site_instance_id) { |
1440 // First remove any swapped out RFH for this SiteInstance from our own list. | 1437 // First remove any swapped out RFH for this SiteInstance from our own list. |
1441 ClearProxiesInSiteInstance(site_instance_id, frame_tree_node_); | 1438 ClearProxiesInSiteInstance(site_instance_id, frame_tree_node_); |
1442 | 1439 |
1443 // Use the safe RenderWidgetHost iterator for now to find all RenderViewHosts | 1440 // Use the safe RenderWidgetHost iterator for now to find all RenderViewHosts |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1612 | 1609 |
1613 RenderViewDevToolsAgentHost::OnCancelPendingNavigation( | 1610 RenderViewDevToolsAgentHost::OnCancelPendingNavigation( |
1614 pending_render_frame_host->render_view_host(), | 1611 pending_render_frame_host->render_view_host(), |
1615 render_frame_host_->render_view_host()); | 1612 render_frame_host_->render_view_host()); |
1616 | 1613 |
1617 // We no longer need to prevent the process from exiting. | 1614 // We no longer need to prevent the process from exiting. |
1618 pending_render_frame_host->GetProcess()->RemovePendingView(); | 1615 pending_render_frame_host->GetProcess()->RemovePendingView(); |
1619 | 1616 |
1620 // If the SiteInstance for the pending RFH is being used by others, don't | 1617 // If the SiteInstance for the pending RFH is being used by others, don't |
1621 // delete the RFH, just swap it out and it can be reused at a later point. | 1618 // delete the RFH, just swap it out and it can be reused at a later point. |
1622 SiteInstanceImpl* site_instance = static_cast<SiteInstanceImpl*>( | 1619 SiteInstanceImpl* site_instance = |
1623 pending_render_frame_host->GetSiteInstance()); | 1620 pending_render_frame_host->GetSiteInstance(); |
1624 if (site_instance->active_view_count() > 1) { | 1621 if (site_instance->active_frame_count() > 1) { |
1625 // Any currently suspended navigations are no longer needed. | 1622 // Any currently suspended navigations are no longer needed. |
1626 pending_render_frame_host->CancelSuspendedNavigations(); | 1623 pending_render_frame_host->CancelSuspendedNavigations(); |
1627 | 1624 |
1628 RenderFrameProxyHost* proxy = | 1625 RenderFrameProxyHost* proxy = |
1629 new RenderFrameProxyHost(site_instance, frame_tree_node_); | 1626 new RenderFrameProxyHost(site_instance, frame_tree_node_); |
1630 proxy_hosts_[site_instance->GetId()] = proxy; | 1627 proxy_hosts_[site_instance->GetId()] = proxy; |
1631 pending_render_frame_host->SwapOut(proxy); | 1628 pending_render_frame_host->SwapOut(proxy); |
1632 if (frame_tree_node_->IsMainFrame()) | 1629 if (frame_tree_node_->IsMainFrame()) |
1633 proxy->TakeFrameHostOwnership(pending_render_frame_host.Pass()); | 1630 proxy->TakeFrameHostOwnership(pending_render_frame_host.Pass()); |
1634 } else { | 1631 } else { |
(...skipping 11 matching lines...) Expand all Loading... | |
1646 scoped_ptr<RenderFrameHostImpl> old_render_frame_host = | 1643 scoped_ptr<RenderFrameHostImpl> old_render_frame_host = |
1647 render_frame_host_.Pass(); | 1644 render_frame_host_.Pass(); |
1648 render_frame_host_ = render_frame_host.Pass(); | 1645 render_frame_host_ = render_frame_host.Pass(); |
1649 | 1646 |
1650 if (frame_tree_node_->IsMainFrame()) { | 1647 if (frame_tree_node_->IsMainFrame()) { |
1651 // Update the count of top-level frames using this SiteInstance. All | 1648 // Update the count of top-level frames using this SiteInstance. All |
1652 // subframes are in the same BrowsingInstance as the main frame, so we only | 1649 // subframes are in the same BrowsingInstance as the main frame, so we only |
1653 // count top-level ones. This makes the value easier for consumers to | 1650 // count top-level ones. This makes the value easier for consumers to |
1654 // interpret. | 1651 // interpret. |
1655 if (render_frame_host_) { | 1652 if (render_frame_host_) { |
1656 static_cast<SiteInstanceImpl*>(render_frame_host_->GetSiteInstance())-> | 1653 render_frame_host_->GetSiteInstance()-> |
1657 IncrementRelatedActiveContentsCount(); | 1654 IncrementRelatedActiveContentsCount(); |
1658 } | 1655 } |
1659 if (old_render_frame_host) { | 1656 if (old_render_frame_host) { |
1660 static_cast<SiteInstanceImpl*>(old_render_frame_host->GetSiteInstance())-> | 1657 old_render_frame_host->GetSiteInstance()-> |
1661 DecrementRelatedActiveContentsCount(); | 1658 DecrementRelatedActiveContentsCount(); |
1662 } | 1659 } |
1663 } | 1660 } |
1664 | 1661 |
1665 return old_render_frame_host.Pass(); | 1662 return old_render_frame_host.Pass(); |
1666 } | 1663 } |
1667 | 1664 |
1668 bool RenderFrameHostManager::IsRVHOnSwappedOutList( | 1665 bool RenderFrameHostManager::IsRVHOnSwappedOutList( |
1669 RenderViewHostImpl* rvh) const { | 1666 RenderViewHostImpl* rvh) const { |
1670 RenderFrameProxyHost* proxy = GetRenderFrameProxyHost( | 1667 RenderFrameProxyHost* proxy = GetRenderFrameProxyHost( |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1712 void RenderFrameHostManager::DeleteRenderFrameProxyHost( | 1709 void RenderFrameHostManager::DeleteRenderFrameProxyHost( |
1713 SiteInstance* instance) { | 1710 SiteInstance* instance) { |
1714 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); | 1711 RenderFrameProxyHostMap::iterator iter = proxy_hosts_.find(instance->GetId()); |
1715 if (iter != proxy_hosts_.end()) { | 1712 if (iter != proxy_hosts_.end()) { |
1716 delete iter->second; | 1713 delete iter->second; |
1717 proxy_hosts_.erase(iter); | 1714 proxy_hosts_.erase(iter); |
1718 } | 1715 } |
1719 } | 1716 } |
1720 | 1717 |
1721 } // namespace content | 1718 } // namespace content |
OLD | NEW |