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())); |
} |
} |