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

Issue 298963004: app_list: Fix possible out of bounds index. (Closed)

Created:
6 years, 7 months ago by xiyuan
Modified:
6 years, 6 months ago
Reviewers:
jennyz, sky
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina, tapted
Visibility:
Public.

Description

app_list: Fix possible out of bounds index. - Fix a problem that could not drop at the last position when dragging an item out of a folder; - Fix a case view_model_.Move is called with an out of range target index when dragging the last item out of folder; - Add a test for dragging last item and drop it at last slot; - Speculative fix to protect using an index from data model to modify view_model_; - A few more DCHECKs to catch the out-of-bound case; BUG=370064 TEST=AppListMainViewTest.DragLastItemFromFolderAndDropAtLastSlot Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273151

Patch Set 1 #

Patch Set 2 : add test, speculative out-of-bound add fix #

Patch Set 3 : fix win/mac #

Patch Set 4 : rebase #

Total comments: 3

Patch Set 5 : DCHECK -> CHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+273 lines, -25 lines) Patch
M ui/app_list/cocoa/apps_grid_controller_unittest.mm View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/app_list/test/app_list_test_model.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/app_list/test/app_list_test_model.cc View 1 2 3 3 chunks +23 lines, -0 lines 0 comments Download
M ui/app_list/views/app_list_main_view_unittest.cc View 1 2 6 chunks +193 lines, -6 lines 0 comments Download
M ui/app_list/views/apps_grid_view.h View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download
M ui/app_list/views/apps_grid_view.cc View 1 2 3 4 9 chunks +31 lines, -16 lines 0 comments Download
M ui/app_list/views/test/apps_grid_view_test_api.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ui/app_list/views/test/apps_grid_view_test_api.cc View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M ui/views/view_model.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
xiyuan
jennyz@, app_list/* sky@, for DCHECK in ViewModel::Move and you are welcome to review everything. https://codereview.chromium.org/298963004/diff/120001/ui/app_list/views/apps_grid_view.cc ...
6 years, 7 months ago (2014-05-27 19:57:26 UTC) #1
jennyz
lgtm. Thanks a lot for fixing the issue and adding the test case!
6 years, 7 months ago (2014-05-27 21:32:35 UTC) #2
sky
LGTM - I'm also ok with making all the DCHECKs in this class CHECKs
6 years, 7 months ago (2014-05-27 22:54:34 UTC) #3
xiyuan
The CQ bit was checked by xiyuan@chromium.org
6 years, 7 months ago (2014-05-27 23:10:37 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xiyuan@chromium.org/298963004/140001
6 years, 7 months ago (2014-05-27 23:12:22 UTC) #5
xiyuan
The CQ bit was unchecked by xiyuan@chromium.org
6 years, 6 months ago (2014-05-28 02:04:17 UTC) #6
xiyuan
The CQ bit was checked by xiyuan@chromium.org
6 years, 6 months ago (2014-05-28 02:08:25 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xiyuan@chromium.org/298963004/160001
6 years, 6 months ago (2014-05-28 02:09:49 UTC) #8
commit-bot: I haz the power
6 years, 6 months ago (2014-05-28 05:27:12 UTC) #9
Message was sent while issue was closed.
Change committed as 273151

Powered by Google App Engine
This is Rietveld 408576698