Commit d2da1542 authored by Rakina Zata Amni's avatar Rakina Zata Amni Committed by Chromium LUCI CQ

Remove has-committed-navigation DCHECK in LoadPostCommitErrorPage

We hit some cases where we got an empty URL after initial commit. This
is fine since we'll change the URL to about:blank anyway, so this CL
removes the DCHECK we're hitting.

Bug: 1159779
Change-Id: Ib0ff0bb6f876f5530bec091acb0d0ed7a9a952f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2596947Reviewed-by: default avatarNasko Oskov <nasko@chromium.org>
Commit-Queue: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#839016}
parent 306e51dd
...@@ -3697,11 +3697,11 @@ void NavigationControllerImpl::LoadPostCommitErrorPage( ...@@ -3697,11 +3697,11 @@ void NavigationControllerImpl::LoadPostCommitErrorPage(
mojom::CommonNavigationParamsPtr common_params = mojom::CommonNavigationParamsPtr common_params =
CreateCommonNavigationParams(); CreateCommonNavigationParams();
// |url| might be empty if LoadPostCommitErrorPage happens before the frame // |url| might be empty, such as when LoadPostCommitErrorPage happens before
// actually committed (e.g. iframe with "src" set to a slow-responding URL). // the frame actually committed (e.g. iframe with "src" set to a
// We should rewrite the URL to about:blank in this case, as the renderer will // slow-responding URL). We should rewrite the URL to about:blank in this
// only think a page is an error page if it has a non-empty unreachable URL. // case, as the renderer will only think a page is an error page if it has a
DCHECK(!url.is_empty() || !rfhi->has_committed_any_navigation()); // non-empty unreachable URL.
common_params->url = url.is_empty() ? GURL("about:blank") : url; common_params->url = url.is_empty() ? GURL("about:blank") : url;
mojom::CommitNavigationParamsPtr commit_params = mojom::CommitNavigationParamsPtr commit_params =
CreateCommitNavigationParams(); CreateCommitNavigationParams();
......
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