diff options
author | wtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-05 22:01:11 +0000 |
---|---|---|
committer | wtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-05 22:01:11 +0000 |
commit | 0649e694427d24bdfe7fec6835a44cff674a8325 (patch) | |
tree | bf33b1983c81860ed0ff48bb05587955d8b55156 /chrome/browser | |
parent | db9da27d07d045484f227d7fd3b2f026d6fe7db7 (diff) | |
download | chromium_src-0649e694427d24bdfe7fec6835a44cff674a8325.zip chromium_src-0649e694427d24bdfe7fec6835a44cff674a8325.tar.gz chromium_src-0649e694427d24bdfe7fec6835a44cff674a8325.tar.bz2 |
Add a CHECK to assert that each invocation of
ResourceDispatcherHost::RemovePendingRequest removes
exactly one URLRequest from pending_requests_.
R=eroman
BUG=4749
Review URL: http://codereview.chromium.org/12977
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/resource_dispatcher_host.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/resource_dispatcher_host.cc b/chrome/browser/resource_dispatcher_host.cc index 4b986bc..fa7f1fb 100644 --- a/chrome/browser/resource_dispatcher_host.cc +++ b/chrome/browser/resource_dispatcher_host.cc @@ -1933,6 +1933,8 @@ void ResourceDispatcherHost::RemovePendingRequest(int render_process_host_id, void ResourceDispatcherHost::RemovePendingRequest( const PendingRequestList::iterator& iter) { + size_t num_requests_before = pending_requests_.size(); + // Notify the login handler that this request object is going away. ExtraRequestInfo* info = ExtraInfoForRequest(iter->second); if (info && info->login_handler) @@ -1944,6 +1946,9 @@ void ResourceDispatcherHost::RemovePendingRequest( // If we have no more pending requests, then stop the load state monitor if (pending_requests_.empty()) update_load_states_timer_.Stop(); + + size_t num_requests_after = pending_requests_.size(); + CHECK(num_requests_after == num_requests_before - 1); } // URLRequest::Delegate ------------------------------------------------------- |