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

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

Issue 894843003: Move the RenderProcessGone IPC from RenderViewHost to RenderFrameHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for swapped out RFHs. 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/frame_tree.cc
diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc
index 475effc12dfeb9ae52953535301ac490e300213d..dbf434abaf473dbcdd2f1cbe6909fb5b1137b329 100644
--- a/content/browser/frame_host/frame_tree.cc
+++ b/content/browser/frame_host/frame_tree.cc
@@ -43,19 +43,6 @@ bool FrameTreeNodeForId(int64 frame_tree_node_id,
return true;
}
-// Iterate over the FrameTree to reset any node affected by the loss of the
-// given RenderViewHost's process.
-bool ResetNodesForNewProcess(RenderViewHost* render_view_host,
- FrameTreeNode* node) {
- if (render_view_host == node->current_frame_host()->render_view_host()) {
- // Ensure that if the frame host is reused for a new RenderFrame, it will
- // set up the Mojo connection with that frame.
- node->current_frame_host()->InvalidateMojoConnection();
- node->ResetForNewProcess();
- }
- return true;
-}
-
bool CreateProxyForSiteInstance(const scoped_refptr<SiteInstance>& instance,
FrameTreeNode* node) {
// If a new frame is created in the current SiteInstance, other frames in
@@ -227,16 +214,6 @@ void FrameTree::ResetForMainFrameSwap() {
focused_frame_tree_node_id_ = -1;
}
-void FrameTree::RenderProcessGone(RenderViewHost* render_view_host) {
- // Walk the full tree looking for nodes that may be affected. Once a frame
- // crashes, all of its child FrameTreeNodes go away.
- // Note that the helper function may call ResetForNewProcess on a node, which
- // clears its children before we iterate over them. That's ok, because
- // ForEach does not add a node's children to the queue until after visiting
- // the node itself.
- ForEach(base::Bind(&ResetNodesForNewProcess, render_view_host));
-}
-
RenderFrameHostImpl* FrameTree::GetMainFrame() const {
return root_->current_frame_host();
}
@@ -312,7 +289,8 @@ void FrameTree::RegisterRenderFrameHost(
void FrameTree::UnregisterRenderFrameHost(
RenderFrameHostImpl* render_frame_host) {
- SiteInstance* site_instance = render_frame_host->GetSiteInstance();
+ SiteInstance* site_instance =
+ render_frame_host->render_view_host()->GetSiteInstance();
Charlie Reis 2015/02/06 00:04:47 Looks like a failed merge here.
nasko 2015/02/06 01:10:48 Oh, that was auto merged :(. Thanks for catching i
int32 site_instance_id = site_instance->GetId();
RenderViewHostMap::iterator iter =
render_view_host_map_.find(site_instance_id);

Powered by Google App Engine
This is Rietveld 408576698