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

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

Issue 2768813002: PlzNavigate: don't stop all loaders when renderer-initiated nav fails
Patch Set: Removed id Created 3 years, 9 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
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | content/common/frame_messages.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/frame_tree_node.cc
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc
index ee394a607ab5e7cadf5abfc96f44a58bddddd9d9..f3ce0aa7bd649a72a35b91c9ebbe57cf6216e03d 100644
--- a/content/browser/frame_host/frame_tree_node.cc
+++ b/content/browser/frame_host/frame_tree_node.cc
@@ -400,7 +400,13 @@ void FrameTreeNode::ResetNavigationRequest(bool keep_state,
CHECK(IsBrowserSideNavigationEnabled());
if (!navigation_request_)
return;
- bool was_renderer_initiated = !navigation_request_->browser_initiated();
+
+ // The renderer should be informed if the caller allows to do so and the
+ // navigation came from a BeginNavigation IPC. This corresponds to
+ // may_transfer being set to false on the NavigationRequest.
+ int need_to_inform_renderer =
+ inform_renderer && !navigation_request_->may_transfer();
Charlie Reis 2017/03/23 16:52:53 Hmm, I'm not sure I understand this change. Why w
clamy 2017/04/24 13:53:44 We should only inform the renderer if the navigati
Charlie Reis 2017/04/24 20:13:38 Ok, so the OpenURL case means the renderer doesn't
clamy 2017/04/25 12:24:08 I agree that the naming is confusing. I think we n
+
NavigationRequest::AssociatedSiteInstanceType site_instance_type =
navigation_request_->associated_site_instance_type();
navigation_request_.reset();
@@ -425,9 +431,9 @@ void FrameTreeNode::ResetNavigationRequest(bool keep_state,
// process asked for the navigation to be aborted, e.g. following a
// document.open, do not send an IPC to the renderer process as it already
// expects the navigation to stop.
- if (was_renderer_initiated && inform_renderer) {
+ if (need_to_inform_renderer) {
current_frame_host()->Send(
- new FrameMsg_Stop(current_frame_host()->GetRoutingID()));
+ new FrameMsg_DroppedNavigation(current_frame_host()->GetRoutingID()));
}
}
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | content/common/frame_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698