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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 156303004: With --site-per-process, avoid a crash when a subframe process goes away. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable on GTK, add test. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 delegate_->RenderViewReady(this); 1425 delegate_->RenderViewReady(this);
1426 } 1426 }
1427 1427
1428 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) { 1428 void RenderViewHostImpl::OnRenderProcessGone(int status, int exit_code) {
1429 // Keep the termination status so we can get at it later when we 1429 // Keep the termination status so we can get at it later when we
1430 // need to know why it died. 1430 // need to know why it died.
1431 render_view_termination_status_ = 1431 render_view_termination_status_ =
1432 static_cast<base::TerminationStatus>(status); 1432 static_cast<base::TerminationStatus>(status);
1433 1433
1434 // Reset frame tree state. 1434 // Reset frame tree state.
1435 // TODO(creis): Once subframes can be in different processes, we'll need to 1435 // TODO(creis): Once subframes can be in different processes, we'll need to
nasko 2014/02/11 04:49:16 nit: This comment is now stale, right?
Charlie Reis 2014/02/12 00:27:57 Ah, of course. Done.
1436 // clear just the FrameTreeNodes affected by the crash (and their subtrees). 1436 // clear just the FrameTreeNodes affected by the crash (and their subtrees).
1437 main_frame_id_ = -1; 1437 main_frame_id_ = -1;
1438 delegate_->GetFrameTree()->ResetForMainFrameSwap(); 1438 delegate_->GetFrameTree()->RenderProcessGone(this);
1439 1439
1440 // Our base class RenderWidgetHost needs to reset some stuff. 1440 // Our base class RenderWidgetHost needs to reset some stuff.
1441 RendererExited(render_view_termination_status_, exit_code); 1441 RendererExited(render_view_termination_status_, exit_code);
1442 1442
1443 delegate_->RenderViewTerminated(this, 1443 delegate_->RenderViewTerminated(this,
1444 static_cast<base::TerminationStatus>(status), 1444 static_cast<base::TerminationStatus>(status),
1445 exit_code); 1445 exit_code);
1446 } 1446 }
1447 1447
1448 void RenderViewHostImpl::OnDidStartProvisionalLoadForFrame( 1448 void RenderViewHostImpl::OnDidStartProvisionalLoadForFrame(
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
2266 void RenderViewHostImpl::AttachToFrameTree() { 2266 void RenderViewHostImpl::AttachToFrameTree() {
2267 FrameTree* frame_tree = delegate_->GetFrameTree(); 2267 FrameTree* frame_tree = delegate_->GetFrameTree();
2268 2268
2269 frame_tree->ResetForMainFrameSwap(); 2269 frame_tree->ResetForMainFrameSwap();
2270 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { 2270 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) {
2271 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); 2271 frame_tree->OnFirstNavigationAfterSwap(main_frame_id());
2272 } 2272 }
2273 } 2273 }
2274 2274
2275 } // namespace content 2275 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698