Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Issue 2622283002: [WebView 56] Post onPageFinished for committed Url if nav to error page. (Closed)

Created:
3 years, 11 months ago by gsennton
Modified:
3 years, 11 months ago
CC:
chromium-reviews, android-webview-reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/branch-heads/2924
Project:
chromium
Visibility:
Public.

Description

[WebView 56] Post onPageFinished for committed Url if nav to error page. Problem: Receiving an empty response for a request results in bad behaviour w.r.t. WebContentsObserver in 56 (and, 54 and 55). We receive no didFinishLoad and no didFailLoad. Arguably, this is because the load didn't finish correctly (empty response -> no didFinishLoad), but the load didn't quite fail either (the response was returned to the client) -> no didFailLoad. WebView uses primarily didFinishLoad and didFailLoad to post onPageFinished calls to the embedding WebView app. Thus, in the affected versions, WebView wouldn't post onPageFinished when receiving and empty response for a request. Short-term solution [56] Currently, we post onPageFinished from didStopLoading (all navigations have finished) for the current Url only if that was the last Url for which we received didFinishLoad. With this CL, also post onPageFinished (from didStopLoading) if the current Url was committed when we started loading an error page. This catches the empty-response case since in that case the Url for which we receive no didFinishLoad/didFailLoad first commits and then an error page is loaded. With this CL also remove an unnecessary posting of onPageFinished from shouldInterceptRequest - this change is the same as the one in https://codereview.chromium.org/2624443002 Long-term solution [57+] The issue at hand was fixed on master in b22a26e4c12a8fc5c22d623e99674335e26cf5e3 https://codereview.chromium.org/2563423004/ but we didn't want to merge that change to 56. BUG=b/32629339 BUG=656919 NOTRY=true NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2622283002 Cr-Commit-Position: refs/branch-heads/2924@{#747} Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059} Committed: https://chromium.googlesource.com/chromium/src/+/00b73e7d682c407bf15fc79e667c75fc3112ebd3

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -5 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 chunk +2 lines, -4 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java View 3 chunks +29 lines, -1 line 0 comments Download

Messages

Total messages: 17 (7 generated)
gsennton
Hey guys, Selim has the actual commit power here (so ptal :)). Btw, Selim, should ...
3 years, 11 months ago (2017-01-11 14:39:48 UTC) #2
Nate Chapin
On 2017/01/11 14:39:48, gsennton wrote: > Hey guys, Selim has the actual commit power here ...
3 years, 11 months ago (2017-01-11 18:53:51 UTC) #3
gsennton
On 2017/01/11 18:53:51, Nate Chapin wrote: > On 2017/01/11 14:39:48, gsennton wrote: > > Hey ...
3 years, 11 months ago (2017-01-11 19:36:34 UTC) #4
sgurun-gerrit only
On 2017/01/11 19:36:34, gsennton wrote: > On 2017/01/11 18:53:51, Nate Chapin wrote: > > On ...
3 years, 11 months ago (2017-01-11 23:06:45 UTC) #5
gsennton
On 2017/01/11 23:06:45, sgurun wrote: > On 2017/01/11 19:36:34, gsennton wrote: > > On 2017/01/11 ...
3 years, 11 months ago (2017-01-12 19:20:07 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2622283002/1
3 years, 11 months ago (2017-01-12 21:33:01 UTC) #8
commit-bot: I haz the power
CLs for remote refs other than refs/pending/heads/master must contain NOTRY=true and NOPRESUBMIT=true in order for ...
3 years, 11 months ago (2017-01-12 21:33:03 UTC) #10
gsennton
Adding notry and nopresubmit and committing.
3 years, 11 months ago (2017-01-12 22:16:43 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2622283002/1
3 years, 11 months ago (2017-01-12 22:18:07 UTC) #14
commit-bot: I haz the power
3 years, 11 months ago (2017-01-12 22:20:05 UTC) #17
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/00b73e7d682c407bf15fc79e667c...

Powered by Google App Engine
This is Rietveld 408576698