[Omnibox] Avoid removing the `www.` prefix during deduping when doing so would...
[Omnibox] Avoid removing the `www.` prefix during deduping when doing so would leave no host component. When sorting and deduping matches, match GURLs are stripped (`AutocompleteMatch::GURLToStrippedGURL`). Certain omnibox inputs, such as `http://www.` without inline autocomplete, produce matches with host compoments `www.`. Stripping `www.` in these cases would result in an empty url host component and, therefore, invalid `GURL`. Invoking `GURL::spec` on such invalid URLs would then cause a DCHECK to evaluate false and crash the browser. The crash only affects debug builds as the DCHECK is inactive for non-debug builds. Bug: 898554 Change-Id: I73461c65ba53891d6f3b52bc767c754b02c1ce3e Reviewed-on: https://chromium-review.googlesource.com/c/1331631 Commit-Queue: manuk hovanesian <manukh@chromium.org> Reviewed-by:Tommy Li <tommycli@chromium.org> Cr-Commit-Position: refs/heads/master@{#607709}
Showing
Please register or sign in to comment