[iOS] Don't call CanShowUIForRequest() if there's no active request.
When the Browser is destroyed, all OverlayRequests are cancelled. However, if there is a presented overlay, |presenting_| will still be true. The active request is moved from the WebState to the |removed_request_awaiting_dismissal_| variable until it is finished being dismissed. This CL checks that the active request is non-null before checking whether the presentation context is capable of presenting its UI with its new capabilities. Additionally, the cancelled request is destroyed when the Browser is destroyed so that its completion callback can be executed. Bug: 1065564 Change-Id: I12f4ae9b2d6090b631590a18d0314d2175822490 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135153 Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org> Auto-Submit: Kurt Horimoto <kkhorimoto@chromium.org> Reviewed-by:Mike Dougherty <michaeldo@chromium.org> Cr-Commit-Position: refs/heads/master@{#757601}
Showing
Please register or sign in to comment