Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index 339d818953fafa5f75e9d3819d5bcdec2c2aae70..ad34b51e754d97b29942d3f82d617fde054efbfd 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -2722,6 +2722,17 @@ void RenderFrameImpl::didCommitProvisionalLoad( |
NavigationStateImpl* navigation_state = |
static_cast<NavigationStateImpl*>(document_state->navigation_state()); |
+ // We may see a "commit" for the initial blank page (e.g., when opening a |
+ // popup with no URL). This should not count as a navigation. (Note that |
+ // subsequent about:blank navigations marked as WebStandardCommit do count as |
+ // new navigations and remain in history.) |
+ if (render_view_->history_list_length_ == 0 && |
+ !frame->parent() && |
+ commit_type != blink::WebStandardCommit && |
+ navigation_state->request_params().nav_entry_id == 0 && |
+ GetLoadingUrl() == GURL(url::kAboutBlankURL)) |
+ return; |
+ |
if (proxy_routing_id_ != MSG_ROUTING_NONE) { |
RenderFrameProxy* proxy = |
RenderFrameProxy::FromRoutingID(proxy_routing_id_); |
@@ -4612,8 +4623,6 @@ void RenderFrameImpl::NavigateInternal( |
} |
should_load_request = true; |
} else if (is_history_navigation) { |
- // We must know the page ID of the page we are navigating back to. |
- DCHECK_NE(request_params.page_id, -1); |
// We must know the nav entry ID of the page we are navigating back to, |
// which should be the case because history navigations are routed via the |
// browser. |