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

Unified Diff: components/webdata/common/web_data_request_manager.cc

Issue 2422323002: Don't handle DCHECK failure. (Closed)
Patch Set: Created 4 years, 2 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: components/webdata/common/web_data_request_manager.cc
diff --git a/components/webdata/common/web_data_request_manager.cc b/components/webdata/common/web_data_request_manager.cc
index d03d841bf64fde0c3eeab115e74003cdadb33cbf..9f8186396978fda4e2601ecaf4657bc30bdf9dec 100644
--- a/components/webdata/common/web_data_request_manager.cc
+++ b/components/webdata/common/web_data_request_manager.cc
@@ -104,10 +104,7 @@ int WebDataRequestManager::GetNextRequestHandle() {
void WebDataRequestManager::CancelRequest(WebDataServiceBase::Handle h) {
base::AutoLock l(pending_lock_);
RequestMap::iterator i = pending_requests_.find(h);
- if (i == pending_requests_.end()) {
- NOTREACHED() << "Canceling a nonexistent web data service request";
- return;
- }
+ DCHECK(i != pending_requests_.end());
i->second->Cancel();
pending_requests_.erase(i);
}
@@ -134,10 +131,7 @@ void WebDataRequestManager::RequestCompletedOnThread(
{
base::AutoLock l(pending_lock_);
RequestMap::iterator i = pending_requests_.find(request->GetHandle());
- if (i == pending_requests_.end()) {
- NOTREACHED() << "Request completed called for an unknown request";
- return;
- }
+ DCHECK(i != pending_requests_.end());
// Take ownership of the request object and remove it from the map.
pending_requests_.erase(i);
« 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