Commit 0f8a2964 authored by Danyao Wang's avatar Danyao Wang Committed by Commit Bot

[Nav Experiment] Remove DCHECK for incorrect assumption.

Previously I assumed -webView:didReceivedAuthenticationChallenge callback
is always called for the navigation associated with the current
WKWebView.URL value. In testing, it turns out in back/forward navigation,
this callback may be triggered for a subresource on the previous item
after WKWebView.URL has already been updated to the new item. As a result,
this DCHECK is incorrectly triggered when navigating back to NTP from a
web page before the web page finishes loading completely.

From code inspection, the implementation of this delegate call doesn't
depend on states associated with self.currentNavItem. This scenario
already exists between web pages. So the DCHECK is not protecting any
meaningful state corruption.

Bug: 864525
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I02a1678721e2db59ed1f288c9e4ec7139efc8632
Reviewed-on: https://chromium-review.googlesource.com/1147328Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Danyao Wang <danyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577924}
parent b4abaad4
......@@ -4987,10 +4987,6 @@ registerLoadRequestForURL:(const GURL&)requestURL
NSURLCredential*))completionHandler {
[self didReceiveWebViewNavigationDelegateCallback];
// This callback should never be triggered for placeholder navigations.
DCHECK(!(web::GetWebClient()->IsSlimNavigationManagerEnabled() &&
IsPlaceholderUrl(net::GURLWithNSURL(webView.URL))));
NSString* authMethod = challenge.protectionSpace.authenticationMethod;
if ([authMethod isEqual:NSURLAuthenticationMethodHTTPBasic] ||
[authMethod isEqual:NSURLAuthenticationMethodNTLM] ||
......
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