Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS][web] Update ErrorRetryStateMachine when committed navigation is…
… cancelled The ErrorRetryStateMachine is responsible for determining how to handle a failed load -- whether to first load a placeholder URL, creating a new back / forward item, or to directly load an error view into the current item. When there's an error on a previously-visited item, the right thing to do is to directly load an error view into the current item, since loading a placeholder URL will destroy the forward list. For navigations that are cancelled after they are committed (e.g., because the user enters another URL to navigate to before the navigation finishes), [CRWWebController handleLoadError] earlies-out after calling |handleCancelledError|, which means it skips updating the ErrorRetryStateMachine. This leaves the state machine in state |kNewRequest|. As a result, if a later back / forward navigation to this item fails, a placeholder will be loaded, destroying the forward list. This CL makes |handleCancelledError| update the ErrorRetryStateMachine to state |kNoNavigationError| for navigations that have already committed. This means that future failed loads of this item will cause the error view to be loaded into the current item, preserving the forward list. Bug: 950489 Change-Id: I39dc2d5587525875b8f025ee4f9bd7cb94dd955f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1629000 Commit-Queue: Ali Juma <ajuma@chromium.org> Reviewed-by: Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#663570}
- Loading branch information