Skip to content

Commit

Permalink
Fixes NullPointerException when url is null and user is navigating back
Browse files Browse the repository at this point in the history
from an error page in a custom tab.

Bug: 1287952
Change-Id: Ie61dd911792405f10bb75f346db74f0f257f1f95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3398638
Reviewed-by: Peter Conn <peconn@chromium.org>
Commit-Queue: Alex Mitra <alexmitra@chromium.org>
Cr-Commit-Position: refs/heads/main@{#960879}
  • Loading branch information
AlexMitraChromium authored and Chromium LUCI CQ committed Jan 19, 2022
1 parent b8115e5 commit d1631fd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public ContextMenuPopulatorFactory createContextMenuPopulatorFactory(Tab tab) {
public NativePage createNativePage(String url, NativePage candidatePage, Tab tab) {
// Navigation comes from user pressing "Back to safety" on an interstitial so close the tab.
// See crbug.com/1270695
if (url.equals(UrlConstants.NTP_URL) && tab.isShowingErrorPage()) {
if (UrlConstants.NTP_URL.equals(url) && tab.isShowingErrorPage()) {
mNavigationDelegate.closeTab();
}
// Custom tab does not create native pages.
Expand Down

0 comments on commit d1631fd

Please sign in to comment.