summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cancelable_request.cc
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 17:55:37 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 17:55:37 +0000
commit0f19f563ad5449d28b5764337cb1bbef0e5f83a3 (patch)
treeaed1a9811af865a9ae2cc211f4f172c35222eb79 /chrome/browser/cancelable_request.cc
parent31663dd403b2e4b69a0ec411c377a8c8642cf7d8 (diff)
downloadchromium_src-0f19f563ad5449d28b5764337cb1bbef0e5f83a3.zip
chromium_src-0f19f563ad5449d28b5764337cb1bbef0e5f83a3.tar.gz
chromium_src-0f19f563ad5449d28b5764337cb1bbef0e5f83a3.tar.bz2
Fix a few places that wind up using Lock recursively.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cancelable_request.cc')
-rw-r--r--chrome/browser/cancelable_request.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/cancelable_request.cc b/chrome/browser/cancelable_request.cc
index 949726f..8c0a82a 100644
--- a/chrome/browser/cancelable_request.cc
+++ b/chrome/browser/cancelable_request.cc
@@ -40,7 +40,7 @@ CancelableRequestProvider::~CancelableRequestProvider() {
// then the Profile is deleted.
AutoLock lock(pending_request_lock_);
while (!pending_requests_.empty())
- CancelRequest(pending_requests_.begin()->first);
+ CancelRequestLocked(pending_requests_.begin()->first);
}
CancelableRequestProvider::Handle CancelableRequestProvider::AddRequest(
@@ -63,7 +63,10 @@ CancelableRequestProvider::Handle CancelableRequestProvider::AddRequest(
void CancelableRequestProvider::CancelRequest(Handle handle) {
AutoLock lock(pending_request_lock_);
+ CancelRequestLocked(handle);
+}
+void CancelableRequestProvider::CancelRequestLocked(Handle handle) {
CancelableRequestMap::iterator i = pending_requests_.find(handle);
if (i == pending_requests_.end()) {
NOTREACHED() << "Trying to cancel an unknown request";