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

Unified Diff: chrome/browser/custom_home_pages_table_model.cc

Issue 12548008: Really fix crash when dragging and dropping in chrome://settings/startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Trim quotes Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/options/browser_options_startup_page_list.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/custom_home_pages_table_model.cc
diff --git a/chrome/browser/custom_home_pages_table_model.cc b/chrome/browser/custom_home_pages_table_model.cc
index 54f1c08779141c1cd68ea67c94de41a9737c06a7..29248bdd0b870fdc1ae3e5acb855017897b763da 100644
--- a/chrome/browser/custom_home_pages_table_model.cc
+++ b/chrome/browser/custom_home_pages_table_model.cc
@@ -96,11 +96,8 @@ void CustomHomePagesTableModel::SetURLs(const std::vector<GURL>& urls) {
*/
void CustomHomePagesTableModel::MoveURLs(int insert_before,
const std::vector<int>& index_list) {
- // Was causing crashes when just a DCHECK(), see http://crbug.com/136576.
- if (index_list.empty() || insert_before < 0 || insert_before > RowCount()) {
- NOTREACHED();
- return;
- }
+ DCHECK(!index_list.empty());
+ DCHECK(insert_before >= 0 && insert_before <= RowCount());
// The range of elements that needs to be reshuffled is [ |first|, |last| ).
int first = std::min(insert_before, index_list.front());
« no previous file with comments | « no previous file | chrome/browser/resources/options/browser_options_startup_page_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698