Commit 7a6e20e5 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Checks if PasswordDelegate is not nil when Modal was presented.

Since infobarModalPresentedFromBanner is called as completion
for the Modal presentation, there's a chance the Infobar could've been
destroyed by then, if this is the case passwordInfoBarDelegate was
set to nil in stop, and we shouldn't call InfobarPresenting.

Bug: 1055340
Change-Id: I603b7e6bdbd39094dc7cecea7f0e8084a91b6b24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2072646Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#744361}
parent 0cc3b5eb
...@@ -177,7 +177,10 @@ ...@@ -177,7 +177,10 @@
if (presentedFromBanner) if (presentedFromBanner)
return; return;
self.passwordInfoBarDelegate->InfobarPresenting(NO /*automatic*/); // There's a chance the Delegate was destroyed while the presentation was
// taking place. Check if the delegate still exists.
if (self.passwordInfoBarDelegate)
self.passwordInfoBarDelegate->InfobarPresenting(NO /*automatic*/);
} }
- (void)dismissBannerIfReady { - (void)dismissBannerIfReady {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment