New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 685621 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

CollectionViewModel hasItemAtIndexPath and itemAtIndexPath does not take nil into account

Project Member Reported by gambard@chromium.org, Jan 26 2017

Issue description

CollectionViewModel's hasItemAtIndexPath and itemAtIndexPath treats a nil argument as a request for 0-0.
It should return NO and probably DCHECK.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9899c468303d9472eeac076b486689753545f827

commit 9899c468303d9472eeac076b486689753545f827
Author: gambard <gambard@chromium.org>
Date: Thu Jan 26 15:49:15 2017

Can request CollectionViewModel itemAtIndexPath with nil

This CL makes sure that if CollectionViewModel is asked for the item at a nil
index path, it fails instead of treating it as requesting 0-0.

BUG= 685621 

Review-Url: https://codereview.chromium.org/2659593002
Cr-Commit-Position: refs/heads/master@{#446336}

[modify] https://crrev.com/9899c468303d9472eeac076b486689753545f827/ios/chrome/browser/ui/collection_view/collection_view_model.mm
[modify] https://crrev.com/9899c468303d9472eeac076b486689753545f827/ios/chrome/browser/ui/collection_view/collection_view_model_unittest.mm

Status: Fixed (was: Assigned)

Sign in to add a comment