Commit 939bc11c authored by edchin's avatar edchin Committed by Commit Bot

[ios] Replace recently added DCHECK with TODO to fix underlying issue

A DCHECK was recently added that revealed that the
tab grid cell is nil sometimes in |-cellForItemAtIndexPath:|.
The cell should never be nil in this method.
This is an issue that was previously went unnoticed, but
adding a DCHECK unsurfaced this existing issue.

This CL removes that DCHECK since it was recently added.
It is replaced with a TODO so that the underlying issue can be fixed.

Bug: 839892
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I85e486786978f992e2b67a7c67b626fbfe97d898
Reviewed-on: https://chromium-review.googlesource.com/1044506Reviewed-by: default avataredchin <edchin@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556089}
parent 72390a42
...@@ -332,6 +332,7 @@ NSIndexPath* CreateIndexPath(NSInteger index) { ...@@ -332,6 +332,7 @@ NSIndexPath* CreateIndexPath(NSInteger index) {
return; return;
GridCell* cell = base::mac::ObjCCastStrict<GridCell>( GridCell* cell = base::mac::ObjCCastStrict<GridCell>(
[self.collectionView cellForItemAtIndexPath:CreateIndexPath(index)]); [self.collectionView cellForItemAtIndexPath:CreateIndexPath(index)]);
// TODO(crbug.com/839892) : Cell is sometimes nil, but should not be.
[self configureCell:cell withItem:item]; [self configureCell:cell withItem:item];
} }
...@@ -394,7 +395,7 @@ NSIndexPath* CreateIndexPath(NSInteger index) { ...@@ -394,7 +395,7 @@ NSIndexPath* CreateIndexPath(NSInteger index) {
// this view controller's theme. This view controller becomes the delegate for // this view controller's theme. This view controller becomes the delegate for
// the cell. // the cell.
- (void)configureCell:(GridCell*)cell withItem:(GridItem*)item { - (void)configureCell:(GridCell*)cell withItem:(GridItem*)item {
DCHECK(cell); // TODO(crbug.com/839892) : Cell is sometimes nil. Add DCHECK(cell) here.
DCHECK(item); DCHECK(item);
cell.delegate = self; cell.delegate = self;
cell.theme = self.theme; cell.theme = self.theme;
......
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