Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index a3da37ba15924815c423a4654045bb9be5b22ef9..2fc304be43fd2f85512dd3f448c2ef5af0f83af0 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -1589,6 +1589,7 @@ bool RenderFrameImpl::OnMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(FrameMsg_FailedNavigation, OnFailedNavigation) |
IPC_MESSAGE_HANDLER(FrameMsg_ReportContentSecurityPolicyViolation, |
OnReportContentSecurityPolicyViolation) |
+ IPC_MESSAGE_HANDLER(FrameMsg_DroppedNavigation, OnDroppedNavigation) |
IPC_MESSAGE_HANDLER(FrameMsg_GetSavableResourceLinks, |
OnGetSavableResourceLinks) |
IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, |
@@ -5312,6 +5313,16 @@ void RenderFrameImpl::OnReportContentSecurityPolicyViolation( |
BuildWebContentSecurityPolicyViolation(violation_params)); |
} |
+void RenderFrameImpl::OnDroppedNavigation(int navigation_id) { |
+ // Check that the navigation dropped was the last one sent to the browser |
+ // process. If not, do nothing as the browser process still has some more |
+ // navigations to process. |
+ if (navigation_id != navigation_id_) |
+ return; |
+ browser_side_navigation_pending_ = false; |
+ frame_->clientDroppedNavigation(); |
+} |
+ |
WebNavigationPolicy RenderFrameImpl::decidePolicyForNavigation( |
const NavigationPolicyInfo& info) { |
// A content initiated navigation may have originated from a link-click, |
@@ -6399,7 +6410,7 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) { |
blink::WebURLRequest::ServiceWorkerMode::All, |
GetRequestContextTypeForWebURLRequest(info.urlRequest), |
GetMixedContentContextTypeForWebURLRequest(info.urlRequest), |
- is_form_submission, initiator_origin); |
+ is_form_submission, initiator_origin, ++navigation_id_); |
if (!info.form.isNull()) { |
WebSearchableFormData web_searchable_form_data(info.form); |