Index: android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java |
diff --git a/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java b/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java |
index 85cf90ce03c7c53559c978b64724d96c045e606f..53715c67b5f8c6d520ee8ec445e1054c31c8abbc 100644 |
--- a/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java |
+++ b/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java |
@@ -53,9 +53,13 @@ public class AwWebContentsObserver extends WebContentsObserver { |
String unreachableWebDataUrl = AwContentsStatics.getUnreachableWebDataUrl(); |
boolean isErrorUrl = |
unreachableWebDataUrl != null && unreachableWebDataUrl.equals(failingUrl); |
- if (isMainFrame && !isErrorUrl && errorCode == NetError.ERR_ABORTED) { |
+ if (isMainFrame && !isErrorUrl && errorCode == NetError.ERR_ABORTED |
+ && !wasIgnoredByHandler) { |
// Need to call onPageFinished for backwards compatibility with the classic webview. |
// See also AwContents.IoThreadClientImpl.onReceivedError. |
+ // If the navigation was ignored because of shouldOverrideUrlLoading we have already |
+ // called onPageFinished in |
+ // AwContents.InterceptNavigationDelegateImpl.shouldIgnoreNavigation instead. |
client.getCallbackHelper().postOnPageFinished(failingUrl); |
} |
} |