diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-25 15:06:02 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-25 15:06:02 +0000 |
commit | 4411da94f1baa219db5c7ca830ca834ac06dfae0 (patch) | |
tree | 6cd010f338acdf5c43271eb84a9545afd57a0c38 | |
parent | 1f39ab21670e009668554c2e74f9e5c7f4ef59eb (diff) | |
download | chromium_src-4411da94f1baa219db5c7ca830ca834ac06dfae0.zip chromium_src-4411da94f1baa219db5c7ca830ca834ac06dfae0.tar.gz chromium_src-4411da94f1baa219db5c7ca830ca834ac06dfae0.tar.bz2 |
Revert 63651 (turned chromeos red, http://build.chromium.org/buildbot/waterfall/builders/Linux%20Builder%20(ChromiumOS%20dbg)/builds/1895/steps/ui_tests/logs/LoadOptionsByURL )- Add LeakTracker<URLRequestContext> to IOThread::CleanUp().
Move LeakTracker<URLRequest> up to CleanUp also. No URLRequest should be getting killed in DestructionObservers anymore.
BUG=59630
TEST=existing
Review URL: http://codereview.chromium.org/4064004
TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/4069002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63731 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/io_thread.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 5a7fb24..8772ffd 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc @@ -35,7 +35,6 @@ #include "net/ocsp/nss_ocsp.h" #endif // defined(USE_NSS) #include "net/proxy/proxy_script_fetcher_impl.h" -#include "net/url_request/url_request_context.h" namespace { @@ -357,10 +356,6 @@ void IOThread::CleanUp() { globals_ = NULL; BrowserProcessSubThread::CleanUp(); - - // URLRequest instances must NOT outlive the IO thread. - base::LeakTracker<URLRequest>::CheckForLeaks(); - base::LeakTracker<URLRequestContext>::CheckForLeaks(); } void IOThread::CleanUpAfterMessageLoopDestruction() { @@ -373,6 +368,13 @@ void IOThread::CleanUpAfterMessageLoopDestruction() { // This will delete the |notification_service_|. Make sure it's done after // anything else can reference it. BrowserProcessSubThread::CleanUpAfterMessageLoopDestruction(); + + // URLRequest instances must NOT outlive the IO thread. + // + // To allow for URLRequests to be deleted from + // MessageLoop::DestructionObserver this check has to happen after CleanUp + // (which runs before DestructionObservers). + base::LeakTracker<URLRequest>::CheckForLeaks(); } net::HttpAuthHandlerFactory* IOThread::CreateDefaultAuthHandlerFactory( |