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

Side by Side Diff: content/browser/web_contents/render_view_host_manager.cc

Issue 10381073: Revert 132407 - Fixing a problem, where a hung renderer process is not killed when navigating away (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1130/src/
Patch Set: Created 8 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 | 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/web_contents/render_view_host_manager.h" 5 #include "content/browser/web_contents/render_view_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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 if (pending_render_view_host_->are_navigations_suspended()) 181 if (pending_render_view_host_->are_navigations_suspended())
182 pending_render_view_host_->SetNavigationsSuspended(false); 182 pending_render_view_host_->SetNavigationsSuspended(false);
183 } else { 183 } else {
184 // The request has been started and paused while we're waiting for the 184 // The request has been started and paused while we're waiting for the
185 // unload handler to finish. We'll pretend that it did, by notifying the 185 // unload handler to finish. We'll pretend that it did, by notifying the
186 // IO thread to let the response continue. The pending renderer will then 186 // IO thread to let the response continue. The pending renderer will then
187 // be swapped in as part of the usual DidNavigate logic. (If the unload 187 // be swapped in as part of the usual DidNavigate logic. (If the unload
188 // handler later finishes, this call will be ignored because the state in 188 // handler later finishes, this call will be ignored because the state in
189 // CrossSiteResourceHandler will already be cleaned up.) 189 // CrossSiteResourceHandler will already be cleaned up.)
190 ViewMsg_SwapOut_Params params; 190 ViewMsg_SwapOut_Params params;
191 params.closing_process_id = render_view_host_->GetProcess()->GetID();
192 params.closing_route_id = render_view_host_->GetRoutingID();
193 params.new_render_process_host_id = 191 params.new_render_process_host_id =
194 pending_render_view_host_->GetProcess()->GetID(); 192 pending_render_view_host_->GetProcess()->GetID();
195 params.new_request_id = pending_request_id; 193 params.new_request_id = pending_request_id;
196 current_host()->GetProcess()->SimulateSwapOutACK(params); 194 current_host()->GetProcess()->CrossSiteSwapOutACK(params);
197 } 195 }
198 return false; 196 return false;
199 } 197 }
200 198
201 void RenderViewHostManager::DidNavigateMainFrame( 199 void RenderViewHostManager::DidNavigateMainFrame(
202 RenderViewHost* render_view_host) { 200 RenderViewHost* render_view_host) {
203 if (!cross_navigation_pending_) { 201 if (!cross_navigation_pending_) {
204 DCHECK(!pending_render_view_host_); 202 DCHECK(!pending_render_view_host_);
205 203
206 // We should only hear this from our current renderer. 204 // We should only hear this from our current renderer.
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 } 893 }
896 894
897 RenderViewHost* RenderViewHostManager::GetSwappedOutRenderViewHost( 895 RenderViewHost* RenderViewHostManager::GetSwappedOutRenderViewHost(
898 SiteInstance* instance) { 896 SiteInstance* instance) {
899 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId()); 897 RenderViewHostMap::iterator iter = swapped_out_hosts_.find(instance->GetId());
900 if (iter != swapped_out_hosts_.end()) 898 if (iter != swapped_out_hosts_.end())
901 return iter->second; 899 return iter->second;
902 900
903 return NULL; 901 return NULL;
904 } 902 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698