Chromium Code Reviews| 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..4325c4c190ee65957ee98071bcd9b908cecbabd4 100644 |
| --- a/chrome/browser/custom_home_pages_table_model.cc |
| +++ b/chrome/browser/custom_home_pages_table_model.cc |
| @@ -96,11 +96,9 @@ 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()) |
| + << "Index out of range: " << insert_before; |
|
Dan Beam
2013/03/09 00:22:04
is this meant to stay here or debugging code? I'd
dcheng
2013/03/09 01:06:22
I figured it didn't matter since it was only going
|
| // The range of elements that needs to be reshuffled is [ |first|, |last| ). |
| int first = std::min(insert_before, index_list.front()); |