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

Issue 600393002: AppListModel / AppsGridView: Better error handling for corner cases. (Closed)

Created:
6 years, 2 months ago by Matt Giuca
Modified:
6 years, 2 months ago
Reviewers:
calamity
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@appsgridview-static-casts
Project:
chromium
Visibility:
Public.

Description

AppListModel / AppsGridView: Better error handling for corner cases. Fixes a potential crash if an app gets duplicated in the app list, and the user tries to drop it onto itself. (There is no known way to repro this currently, but there was recently; see http://crbug.com/415530.) That situation will now result in a very descriptive DCHECK, rather than a confusing low-level CHECK fail. AppListModel::MergeItems: - returns "" instead of crashing if the source and target IDs are equal. - returns "" instead of crashing if the target ID is inside a folder (no longer needs to explicitly CHECK whether it is in a folder.) Added plenty of new tests for the various corner cases in AppListModel::MergeItems which would have caught these crashes. AppsGridView::MoveItemToFolder: - DCHECKs for a NULL result of GetViewAtSlotOnCurrentPage. - DCHECKs that you aren't dropping an item onto itself (this should never happen). BUG=417482 Committed: https://crrev.com/aebcdf88e420f281c950d741106e25dcdf0625e3 Cr-Commit-Position: refs/heads/master@{#297356}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Rebase. #

Patch Set 3 : Comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -2 lines) Patch
M ui/app_list/app_list_model.cc View 2 chunks +10 lines, -2 lines 0 comments Download
M ui/app_list/app_list_model_unittest.cc View 3 chunks +22 lines, -0 lines 0 comments Download
M ui/app_list/views/apps_grid_view.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
Matt Giuca
6 years, 2 months ago (2014-09-25 08:28:53 UTC) #2
Matt Giuca
Reassigning reviewer. mgiuca was not appropriate.
6 years, 2 months ago (2014-09-25 08:35:53 UTC) #4
calamity
lgtm https://codereview.chromium.org/600393002/diff/1/ui/app_list/app_list_model.cc File ui/app_list/app_list_model.cc (right): https://codereview.chromium.org/600393002/diff/1/ui/app_list/app_list_model.cc#newcode96 ui/app_list/app_list_model.cc:96: LOG(WARNING) << "MergeItems tried to drop item onto ...
6 years, 2 months ago (2014-09-26 03:55:18 UTC) #5
Matt Giuca
https://codereview.chromium.org/600393002/diff/1/ui/app_list/app_list_model.cc File ui/app_list/app_list_model.cc (right): https://codereview.chromium.org/600393002/diff/1/ui/app_list/app_list_model.cc#newcode96 ui/app_list/app_list_model.cc:96: LOG(WARNING) << "MergeItems tried to drop item onto itself ...
6 years, 2 months ago (2014-09-29 03:05:03 UTC) #6
Matt Giuca
https://codereview.chromium.org/600393002/diff/1/ui/app_list/app_list_model.cc File ui/app_list/app_list_model.cc (right): https://codereview.chromium.org/600393002/diff/1/ui/app_list/app_list_model.cc#newcode96 ui/app_list/app_list_model.cc:96: LOG(WARNING) << "MergeItems tried to drop item onto itself ...
6 years, 2 months ago (2014-09-29 03:34:35 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/600393002/40001
6 years, 2 months ago (2014-09-30 02:53:51 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001) as d013dabf00a08fe793a1bd6d7d6d735f8f892b58
6 years, 2 months ago (2014-09-30 03:49:52 UTC) #10
commit-bot: I haz the power
6 years, 2 months ago (2014-09-30 03:50:40 UTC) #11
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/aebcdf88e420f281c950d741106e25dcdf0625e3
Cr-Commit-Position: refs/heads/master@{#297356}

Powered by Google App Engine
This is Rietveld 408576698