diff options
Diffstat (limited to 'net/base/host_resolver_impl.cc')
-rw-r--r-- | net/base/host_resolver_impl.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc index 557d42a..15ab7e8 100644 --- a/net/base/host_resolver_impl.cc +++ b/net/base/host_resolver_impl.cc @@ -149,11 +149,6 @@ class HostResolverImpl::Job error_(OK) { } - ~Job() { - // Free the requests attached to this job. - STLDeleteElements(&requests_); - } - // Attaches a request to this job. The job takes ownership of |req| and will // take care to delete it. void AddRequest(Request* req) { @@ -215,6 +210,13 @@ class HostResolverImpl::Job } private: + friend class base::RefCountedThreadSafe<HostResolverImpl::Job>; + + ~Job() { + // Free the requests attached to this job. + STLDeleteElements(&requests_); + } + void DoLookup() { // Running on the worker thread error_ = ResolveAddrInfo(resolver_proc_, |