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

Unified Diff: content/browser/download/download_manager.cc

Issue 7787002: New checks for observer crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_manager.cc
diff --git a/content/browser/download/download_manager.cc b/content/browser/download/download_manager.cc
index 85c9710863e09024508aeb168cbf14ff8817ffc6..bc12c5659c90d6e7053c1240cf28f5bcbdbc1e19 100644
--- a/content/browser/download/download_manager.cc
+++ b/content/browser/download/download_manager.cc
@@ -408,6 +408,8 @@ void DownloadManager::AssertQueueStateConsistent(DownloadItem* download) {
}
}
+ int64 state = download->state();
+ base::debug::Alias(&state);
if (ContainsKey(active_downloads_, download->id()))
CHECK_EQ(DownloadItem::IN_PROGRESS, download->state());
if (DownloadItem::IN_PROGRESS == download->state())
@@ -842,9 +844,9 @@ void DownloadManager::OnDownloadItemAddedToPersistentStore(int32 download_id,
<< " download = " << download->DebugString(true);
// TODO(rdsmith): Remove after http://crbug.com/85408 resolved.
- CHECK(!ContainsKey(history_downloads_, download->db_handle()));
int64 largest_handle = largest_db_handle_in_history_;
base::debug::Alias(&largest_handle);
+ CHECK(!ContainsKey(history_downloads_, db_handle));
AddDownloadItemToHistory(download, db_handle);
@@ -998,9 +1000,9 @@ void DownloadManager::OnSavePageItemAddedToPersistentStore(int32 download_id,
}
// TODO(rdsmith): Remove after http://crbug.com/85408 resolved.
- CHECK(!ContainsKey(history_downloads_, download->db_handle()));
int64 largest_handle = largest_db_handle_in_history_;
base::debug::Alias(&largest_handle);
+ CHECK(!ContainsKey(history_downloads_, db_handle));
AddDownloadItemToHistory(download, db_handle);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698