[iOS] Don't remove navigation for committed SSL interstitial in didFailProvisionalNavigation
The WKNavigation for a committed interstitial is used in the callback passed to ChromeWebClient::PrepareErrorPage, in order to commit the associated navigation item. For SSL interstitials, this callback is called later, asynchronously. This means that deleting the navigation in didFailProvisionalNavigation later leads to a crash when attempting to access the navigation's item, in the case where the error page load is triggered in didFailProvisionalNavigation. This happens in ErrorRetryStateMachine::DidFailProvisionalNavigation when the current webview URL is a restore_session.html URL. This CL fixes this crash by not deleting the navigation in didFailProvisionalNavigation when it is for a committed SSL interstital. There is already similar logic for deciding whether to delete a navigation in didFinishNavigation. Change-Id: Ib8aabeeeca33f63b313daa0772990b8b841d462a Bug: 1050808 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2248137 Commit-Queue: Ali Juma <ajuma@chromium.org> Reviewed-by:Livvie Lin <livvielin@chromium.org> Reviewed-by:
Gauthier Ambard <gambard@chromium.org> Cr-Commit-Position: refs/heads/master@{#779833}
Showing
Please register or sign in to comment