Chromium Code Reviews
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 #
Messages
Total messages: 17 (7 generated)
|
||||||||||||||||||||||||||||