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

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

Issue 2889703002: Ensure that all code paths which call FrameTreeNode::ResetNavigationRequest set NavigationHandle::G… (Closed)
Patch Set: review comments Created 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index eb178c47525eacfe64e6d983a256e13786472693..8ab2e551bde024f90f81605062548a4146eab23b 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -420,6 +420,7 @@ void RenderFrameHostManager::OnCrossSiteResponse(
// If the NavigationHandle wasn't claimed, this will lead to the cancelation
// of the request in the network stack.
if (transfer_navigation_handle_) {
+ transfer_navigation_handle_->set_net_error_code(net::ERR_ABORTED);
transfer_navigation_handle_->set_is_transferring(false);
transfer_navigation_handle_.reset();
}
@@ -1008,6 +1009,12 @@ void RenderFrameHostManager::CancelPendingIfNecessary(
else if (render_frame_host == speculative_render_frame_host_.get()) {
// TODO(nasko, clamy): This should just clean up the speculative RFH
// without canceling the request. See https://crbug.com/636119.
+ if (frame_tree_node_->navigation_request() &&
+ frame_tree_node_->navigation_request()->navigation_handle()) {
+ frame_tree_node_->navigation_request()
+ ->navigation_handle()
+ ->set_net_error_code(net::ERR_ABORTED);
+ }
frame_tree_node_->ResetNavigationRequest(false, true);
}
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698