diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-01 23:46:40 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-01 23:46:40 +0000 |
commit | bf0b51cbeef6ec8f7dc0d5fb46c76a739be5f84d (patch) | |
tree | 2f1a019cceb7eb41664772c54af11eb7e1c37101 /net/base/host_resolver_impl.cc | |
parent | 2d5fa0d0a9751c5eb61baefd43760c36233f2d20 (diff) | |
download | chromium_src-bf0b51cbeef6ec8f7dc0d5fb46c76a739be5f84d.zip chromium_src-bf0b51cbeef6ec8f7dc0d5fb46c76a739be5f84d.tar.gz chromium_src-bf0b51cbeef6ec8f7dc0d5fb46c76a739be5f84d.tar.bz2 |
Modify a temporary hack to be more inclusive.
This papers over a race resulting from the original hack (which itself masks a real problem).
I am trying to find the real culprit (so this temp hack can be decomissioned) as part of <http://codereview.chromium.org/160447>.
BUG=http://crbug.com/16972
Review URL: http://codereview.chromium.org/160478
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22246 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_resolver_impl.cc')
-rw-r--r-- | net/base/host_resolver_impl.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc index 2a0eb0f..934fd33 100644 --- a/net/base/host_resolver_impl.cc +++ b/net/base/host_resolver_impl.cc @@ -16,6 +16,7 @@ #endif #include "base/compiler_specific.h" +#include "base/debug_util.h" #include "base/message_loop.h" #include "base/stl_util-inl.h" #include "base/string_util.h" @@ -367,6 +368,14 @@ int HostResolverImpl::Resolve(const RequestInfo& info, // See OnJobComplete(Job*) for why it is important not to clean out // cancelled requests from Job::requests_. void HostResolverImpl::CancelRequest(RequestHandle req_handle) { + if (shutdown_) { + // TODO(eroman): temp hack for: http://crbug.com/16972. + // Because we destroy outstanding requests during Shutdown() as part of + // hack http://crbug.com/15513, |req_handle| is already cancelled. + LOG(ERROR) << "Called HostResolverImpl::CancelRequest() after Shutdown()."; + StackTrace().PrintBacktrace(); + return; + } Request* req = reinterpret_cast<Request*>(req_handle); DCHECK(req); DCHECK(req->job()); |