Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Issue 2659593002: Can request CollectionViewModel itemAtIndexPath with nil (Closed)

Created:
3 years, 11 months ago by gambard
Modified:
3 years, 11 months ago
Reviewers:
lpromero
CC:
chromium-reviews, marq+watch_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://chromium.googlesource.com/chromium/src/+/9899c468303d9472eeac076b486689753545f827

Patch Set 1 #

Patch Set 2 : Add test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M ios/chrome/browser/ui/collection_view/collection_view_model.mm View 2 chunks +4 lines, -0 lines 0 comments Download
M ios/chrome/browser/ui/collection_view/collection_view_model_unittest.mm View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
gambard
PTAL.
3 years, 11 months ago (2017-01-26 13:35:55 UTC) #2
lpromero
lgtm Lgtm but please add a unit test. You might even check that itemAtIndexPath DCHECKs.
3 years, 11 months ago (2017-01-26 14:40:02 UTC) #3
gambard
I only added a test for the hasItem, not for the DCHECK.
3 years, 11 months ago (2017-01-26 15:39:56 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2659593002/20001
3 years, 11 months ago (2017-01-26 15:40:14 UTC) #7
commit-bot: I haz the power
3 years, 11 months ago (2017-01-26 15:49:57 UTC) #10
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/9899c468303d9472eeac076b4866...

Powered by Google App Engine
This is Rietveld 408576698