summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 23:25:28 +0000
committerwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 23:25:28 +0000
commit6d2b8132aaa55a9e01b8b49bcce5eb44c68a1972 (patch)
treedfd3fcdb5e822112789f9edf3b02ec43700c53b3 /chrome/browser
parent018b41b94745933ded8f1f7be62f325f592057e0 (diff)
downloadchromium_src-6d2b8132aaa55a9e01b8b49bcce5eb44c68a1972.zip
chromium_src-6d2b8132aaa55a9e01b8b49bcce5eb44c68a1972.tar.gz
chromium_src-6d2b8132aaa55a9e01b8b49bcce5eb44c68a1972.tar.bz2
Remove a CHECK in RemovePendingRequest that asserts a
condition that could be false in the new HTTP stack. R=rvargas BUG=4749 Review URL: http://codereview.chromium.org/13799 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/resource_dispatcher_host.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/resource_dispatcher_host.cc b/chrome/browser/resource_dispatcher_host.cc
index a28a3e4..bf58edd 100644
--- a/chrome/browser/resource_dispatcher_host.cc
+++ b/chrome/browser/resource_dispatcher_host.cc
@@ -1916,8 +1916,16 @@ void ResourceDispatcherHost::CancelRequestsForRenderView(
for (size_t i = 0; i < matching_requests.size(); ++i) {
PendingRequestList::iterator iter =
pending_requests_.find(matching_requests[i]);
- CHECK(iter != pending_requests_.end());
- RemovePendingRequest(iter);
+ // Although every matching request was in pending_requests_ when we built
+ // matching_requests, it is normal for a matching request to be not found
+ // in pending_requests_ after we have removed some matching requests from
+ // pending_requests_. For example, deleting a URLRequest that has
+ // exclusive (write) access to an HTTP cache entry may unblock another
+ // URLRequest that needs exclusive access to the same cache entry, and
+ // that URLRequest may complete and remove itself from pending_requests_.
+ // So we need to check that iter is not equal to pending_requests_.end().
+ if (iter != pending_requests_.end())
+ RemovePendingRequest(iter);
}
}