diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 00:04:59 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 00:04:59 +0000 |
commit | 03a69dcb6cbedb76522854b8bf6bde624d5c8301 (patch) | |
tree | ddfae66028127132d1ede834aa57bf1e4a478923 /chrome | |
parent | e8c927ab11958c3d1d7c768674795bcbc8b67bbb (diff) | |
download | chromium_src-03a69dcb6cbedb76522854b8bf6bde624d5c8301.zip chromium_src-03a69dcb6cbedb76522854b8bf6bde624d5c8301.tar.gz chromium_src-03a69dcb6cbedb76522854b8bf6bde624d5c8301.tar.bz2 |
Enable LeakTracker on release builds.
This is intended to be temporary, so we can get data from the dev channel on why URLRequest objects are leaking at shutdown.
WARNING: it may cause a slight slowdown on page cycler.
Also as part of this change, I switched the order that we check URLFetcher / URLRequest.
This is simply so that if both URLFetcher and URLRequest have leaked, we will report the URLFetcher leak rather than the URLRequest leak.
BUG=http://crbug.com/21199, http://crbug.com/18372
Review URL: http://codereview.chromium.org/217005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26765 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 68a3dc3..f971e80 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -106,8 +106,17 @@ class IOThread : public BrowserProcessSubThread { protected: virtual void CleanUp() { // URLFetcher and URLRequest instances must NOT outlive the IO thread. - base::LeakTracker<URLRequest>::CheckForLeaks(); + // + // Strictly speaking, URLFetcher's CheckForLeaks() should be done on the + // UI thread. However, since there _shouldn't_ be any instances left + // at this point, it shouldn't be a race. + // + // We check URLFetcher first, since if it has leaked then an associated + // URLRequest will also have leaked. However it is more useful to + // crash showing the callstack of URLFetcher's allocation than its + // URLRequest member. base::LeakTracker<URLFetcher>::CheckForLeaks(); + base::LeakTracker<URLRequest>::CheckForLeaks(); BrowserProcessSubThread::CleanUp(); } |