Chromium Code Reviews| Index: ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm |
| diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm |
| index 00daaae76b23a69668c80036f8e1ec1972d4c767..20015844f040ff7b65898e3f4ac572ce3a2db6b7 100644 |
| --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm |
| +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_updater.mm |
| @@ -476,6 +476,15 @@ SectionIdentifier SectionIdentifierForInfo( |
| weakItem.attributes = attributes; |
| }]; |
| + __weak ContentSuggestionsCollectionUpdater* weakSelf = self; |
| + [self.dataSource |
| + fetchFaviconImageForSuggestion:articleItem.suggestionIdentifier |
| + completion:^void(UIImage* favicon) { |
| + weakItem.attributes = |
|
lpromero
2017/04/14 13:19:40
I'd advise to return early if one of the weak item
|
| + [FaviconAttributes attributesWithImage:favicon]; |
| + [weakSelf reconfigure:weakItem]; |
| + }]; |
| + |
| return articleItem; |
| } |