From f615770cd0412b2524b8b4451e6518608af9abed Mon Sep 17 00:00:00 2001 From: "eroman@chromium.org" Date: Sat, 15 Jan 2011 02:52:58 +0000 Subject: Suppress a ThreadAssertion warning when joining worker thread for PAC scripts. BUG=69710 Review URL: http://codereview.chromium.org/6295005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71540 0039d316-1c4b-4281-b951-d872f2087c98 --- net/proxy/multi_threaded_proxy_resolver.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/net/proxy/multi_threaded_proxy_resolver.cc b/net/proxy/multi_threaded_proxy_resolver.cc index ad1228c..87e25b0 100644 --- a/net/proxy/multi_threaded_proxy_resolver.cc +++ b/net/proxy/multi_threaded_proxy_resolver.cc @@ -8,6 +8,7 @@ #include "base/string_util.h" #include "base/stringprintf.h" #include "base/threading/thread.h" +#include "base/threading/thread_restrictions.h" #include "net/base/net_errors.h" #include "net/base/net_log.h" #include "net/proxy/proxy_info.h" @@ -336,8 +337,13 @@ void MultiThreadedProxyResolver::Executor::Destroy() { // to avoid deadlocks. resolver_->Shutdown(); - // Join the worker thread. - thread_.reset(); + { + // See http://crbug.com/69710. + base::ThreadRestrictions::ScopedAllowIO allow_io; + + // Join the worker thread. + thread_.reset(); + } // Cancel any outstanding job. if (outstanding_job_) { -- cgit v1.1