From e8d71950d8407783d5cea585ad7e3cabefa1cf66 Mon Sep 17 00:00:00 2001 From: Yi Su Date: Mon, 3 Dec 2018 09:01:16 +0000 Subject: [PATCH] Fix password settings crash by modifying property attributes of TableViewTextItem.textColor. The Canary crashes when a TableViewTextItem configures its cell and checks its "textColor" property, which is "assign" and might get released after assigned. This CL fixes it by changing the property's "assign" attribute to "strong" so that the UIColor object will be retained. Bug: 910542 Change-Id: I44b6a60c52c5a470e69a44ca6670720446ef084b Reviewed-on: https://chromium-review.googlesource.com/c/1356585 Reviewed-by: Sergio Collazos Reviewed-by: Gauthier Ambard Commit-Queue: Yi Su Cr-Original-Commit-Position: refs/heads/master@{#612716}(cherry picked from commit 17c608f8c2aed5a20a7f9e1a1ed5002b48175502) Reviewed-on: https://chromium-review.googlesource.com/c/1356809 Reviewed-by: Yi Su Cr-Commit-Position: refs/branch-heads/3626@{#7} Cr-Branched-From: d897fb137fbaaa9355c0c93124cc048824eb1e65-refs/heads/master@{#612437} --- ios/chrome/browser/ui/table_view/cells/table_view_text_item.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_text_item.h b/ios/chrome/browser/ui/table_view/cells/table_view_text_item.h index 8768ff14077f..a9606d5ea018 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_text_item.h +++ b/ios/chrome/browser/ui/table_view/cells/table_view_text_item.h @@ -18,7 +18,7 @@ // UIColor for the cell's textLabel. Default is // kTableViewTextLabelColorLightGrey. ChromeTableViewStyler's |cellTitleColor| // takes precedence over the default color, but not over |textColor|. -@property(nonatomic, assign) UIColor* textColor; +@property(nonatomic, strong) UIColor* textColor; @property(nonatomic, strong) NSString* text;