Commit b5bb6add authored by sczs's avatar sczs Committed by Commit Bot

[ios] Creates strong reference to InfobarBanner Button.

There's a crash where the containerStack array is being created using
a nil Object. Since all 3 the objects are created in the same scope
the possible reason is that the reference to this objects is being
released before being added to the ViewHierarchy, so no strong reference
is ever created.

An alternative would be keep the button as weak but create a local
variable that holds the button in the meantime. This alternative was
chosen to be consistent with the other properties and since there
shouldn't be a way the UIButton can have a strong reference to the VC.

Bug: 951170
Change-Id: Ib9d172dafc1282d2e08ef75fbc1f1f7a67951016
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1562750
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Auto-Submit: Sergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarChris Lu <thegreenfrog@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649708}
parent 32a6dde6
......@@ -58,7 +58,7 @@ const CGFloat kChangeInPositionForTransition = 100.0;
// YES if the view should be dismissed after any touch gesture has ended.
@property(nonatomic, assign) BOOL shouldDismissAfterTouchesEnded;
// UIButton with title |self.buttonText|, which triggers the Infobar action.
@property(nonatomic, weak) UIButton* infobarButton;
@property(nonatomic, strong) UIButton* infobarButton;
// UILabel displaying |self.titleText|.
@property(nonatomic, strong) UILabel* titleLabel;
// UILabel displaying |self.subTitleText|.
......
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