Commit e5eea8bd authored by Dmitry Gozman's avatar Dmitry Gozman Committed by Commit Bot

DecidePolicyForNavigation should only be called for content-initiated

Adding CHECKs to verify that we did not miss any cases when it's called
for browser-initiated navigation. Will cleanup after a couple of Canaries.

Bug: 789577

Change-Id: I36890e1cb653a7f1795a187be0d80f2a99e10aaf
Reviewed-on: https://chromium-review.googlesource.com/1135934
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575371}
parent 150fc0f4
...@@ -5937,6 +5937,13 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation( ...@@ -5937,6 +5937,13 @@ WebNavigationPolicy RenderFrameImpl::DecidePolicyForNavigation(
->navigation_state() ->navigation_state()
->IsContentInitiated() ->IsContentInitiated()
: !IsBrowserInitiated(pending_navigation_params_.get()); : !IsBrowserInitiated(pending_navigation_params_.get());
// TODO(dgozman): clean this up after some Canary coverage.
CHECK(!pending_navigation_params_);
if (info.extra_data) {
CHECK(static_cast<DocumentState*>(info.extra_data)
->navigation_state()
->IsContentInitiated());
}
// Webkit is asking whether to navigate to a new URL. // Webkit is asking whether to navigate to a new URL.
// This is fine normally, except if we're showing UI from one security // This is fine normally, except if we're showing UI from one security
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment