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

Unified Diff: content/browser/frame_host/navigator_impl.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/navigator_impl.cc
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc
index c677f372f5767093b64cb134621ef84a3f4c3e10..1008c9575d7653d71c5196db652c2de06ce2954e 100644
--- a/content/browser/frame_host/navigator_impl.cc
+++ b/content/browser/frame_host/navigator_impl.cc
@@ -1051,6 +1051,12 @@ void NavigatorImpl::OnAbortNavigation(FrameTreeNode* frame_tree_node) {
void NavigatorImpl::CancelNavigation(FrameTreeNode* frame_tree_node,
bool inform_renderer) {
CHECK(IsBrowserSideNavigationEnabled());
+ 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, inform_renderer);
if (frame_tree_node->IsMainFrame())
navigation_data_.reset();
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698