| 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 a248d3988c34e9ec14d88fc49546ba0ab8e4d166..f985369e29e2eb195163db7f9069bd24197fa6fc 100644
|
| --- a/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java
|
| +++ b/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java
|
| @@ -51,29 +51,9 @@ public class AwWebContentsObserver extends WebContentsObserver {
|
| String unreachableWebDataUrl = AwContentsStatics.getUnreachableWebDataUrl();
|
| boolean isErrorUrl =
|
| unreachableWebDataUrl != null && unreachableWebDataUrl.equals(failingUrl);
|
| - if (isErrorUrl) return;
|
| - if (errorCode != NetError.ERR_ABORTED) {
|
| - // This error code is generated for the following reasons:
|
| - // - WebView.stopLoading is called,
|
| - // - the navigation is intercepted by the embedder via shouldOverrideNavigation.
|
| - //
|
| - // The Android WebView does not notify the embedder of these situations using
|
| - // this error code with the WebViewClient.onReceivedError callback.
|
| - AwContentsClient.AwWebResourceRequest request =
|
| - new AwContentsClient.AwWebResourceRequest();
|
| - request.url = failingUrl;
|
| - request.isMainFrame = isMainFrame;
|
| - // TODO(mnaganov): Fill in the rest of AwWebResourceRequest fields. Probably,
|
| - // we will have to actually invoke the error callback from the network delegate
|
| - // in order to catch load errors for all resources.
|
| - AwContentsClient.AwWebResourceError error = new AwContentsClient.AwWebResourceError();
|
| - error.errorCode = ErrorCodeConversionHelper.convertErrorCode(errorCode);
|
| - error.description = description;
|
| - mAwContentsClient.onReceivedError(request, error);
|
| - }
|
| - if (isMainFrame) {
|
| - // Need to call onPageFinished after onReceivedError (if there is an error) for
|
| - // backwards compatibility with the classic webview.
|
| + if (isMainFrame && !isErrorUrl && errorCode == NetError.ERR_ABORTED) {
|
| + // Need to call onPageFinished for backwards compatibility with the classic webview.
|
| + // See also AwContents.IoThreadClientImpl.onReceivedError.
|
| mAwContentsClient.onPageFinished(failingUrl);
|
| }
|
| }
|
|
|