summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorrdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 16:34:34 +0000
committerrdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 16:34:34 +0000
commit61b75a55cd3366f236584da844cc5f9fd5a37a99 (patch)
tree56e5498db153896381bc7c7ceba45a6800035a7a /content
parentc2fda1a9a9ef7fac72afdd7123250b001e95afea (diff)
downloadchromium_src-61b75a55cd3366f236584da844cc5f9fd5a37a99.zip
chromium_src-61b75a55cd3366f236584da844cc5f9fd5a37a99.tar.gz
chromium_src-61b75a55cd3366f236584da844cc5f9fd5a37a99.tar.bz2
New checks for observer crash.
BUG=85408 Review URL: http://codereview.chromium.org/7787002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98642 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/download/download_manager.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/content/browser/download/download_manager.cc b/content/browser/download/download_manager.cc
index 85c9710..bc12c56 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);