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

Unified Diff: content/browser/cancelable_request.cc

Issue 6646051: Fix DCHECK, memory leak, and refactor PasswordStore to use CancelableRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use non-zero tests until http://crbug.com/77650 is addressed. Created 9 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 | « chrome/test/live_sync/live_passwords_sync_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/cancelable_request.cc
diff --git a/content/browser/cancelable_request.cc b/content/browser/cancelable_request.cc
index f1826fd023539a2ac46cd695d1e1709019df875b..5e36d89dfbeaf8734dcd41482b8e85a6e6c8a41b 100644
--- a/content/browser/cancelable_request.cc
+++ b/content/browser/cancelable_request.cc
@@ -4,7 +4,8 @@
#include "content/browser/cancelable_request.h"
-CancelableRequestProvider::CancelableRequestProvider() : next_handle_(1) {
+CancelableRequestProvider::CancelableRequestProvider()
+ : next_handle_(1) {
}
CancelableRequestProvider::~CancelableRequestProvider() {
@@ -28,6 +29,8 @@ CancelableRequestProvider::Handle CancelableRequestProvider::AddRequest(
handle = next_handle_;
pending_requests_[next_handle_] = request;
++next_handle_;
+ DCHECK(next_handle_)
+ << "next_handle_ may have wrapped around to invalid state.";
}
consumer->OnRequestAdded(this, handle);
« no previous file with comments | « chrome/test/live_sync/live_passwords_sync_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698