Commit 07a677aa authored by sczs's avatar sczs Committed by Commit Bot

[ios] Sets the InfobarCoordinator BadgeDelegate to nil on stop.

This crash was similar to https://crbug.com/983179, where the webState
was invalid and the badgeDelegate was trying to update the badge when a
banner had been dismissed.

In this case it seems that by the time the InfobarBanner has been presented
the webstate is no longer valid (which means the InfobarCoordinator has
been stopped), so we shouldn't try to update the badgeDelegate.

This CL nils the badgeDelegate on stop to prevent this.

Bug: 1054661
Change-Id: Ie0da80981603ede3c4a3ffa1fc5706115e5bf28b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2067940
Auto-Submit: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarChris Lu <thegreenfrog@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743372}
parent 12cfe027
...@@ -89,6 +89,7 @@ const CGFloat kBannerOverlapWithOmnibox = 5.0; ...@@ -89,6 +89,7 @@ const CGFloat kBannerOverlapWithOmnibox = 5.0;
- (void)stop { - (void)stop {
_animatedFullscreenDisabler = nullptr; _animatedFullscreenDisabler = nullptr;
_badgeDelegate = nil;
_infobarDelegate = nil; _infobarDelegate = nil;
} }
......
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