summaryrefslogtreecommitdiffstats
path: root/base/leak_tracker.h
Commit message (Collapse)AuthorAgeFilesLines
* Print allocation callstacks to LOG(ERROR) rather than std err, since ↵eroman@chromium.org2009-11-121-1/+1
| | | | | | | | otherwise it doesn't show up inline in the log file. Review URL: http://codereview.chromium.org/391029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31822 0039d316-1c4b-4281-b951-d872f2087c98
* Disable the leak tracking of URLRequests.eroman@chromium.org2009-09-301-10/+2
| | | | | | | | | | | | | | This doesn't fix anything, it just prevents asserting (and consequently crashing) when the leak is observed, restoring the earlier behavior. There are already a couple of know leaks, so crashing during shutdown isn't real useful until the known issues are fixed. BUG=18372,23284 TBR=darin Review URL: http://codereview.chromium.org/255017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27586 0039d316-1c4b-4281-b951-d872f2087c98
* Enable LeakTracker on release builds.eroman@chromium.org2009-09-221-2/+10
| | | | | | | | | | | | | | | 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
* Copy the leak callstacks onto the stack before crashing in ↵eroman@chromium.org2009-09-211-3/+23
| | | | | | | | | | LeakTracker::CheckForLeaks. This way if it is enabled in release builds, the mini-dump will contain the allocation stacktrace. Review URL: http://codereview.chromium.org/208001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26717 0039d316-1c4b-4281-b951-d872f2087c98
* Make LeakTracker be enabled using ENABLE_LEAK_TRACKER, rather than NDEBUG.eroman@chromium.org2009-09-161-8/+13
| | | | | | | | This way it is easy to toggle it on in release builds. Review URL: http://codereview.chromium.org/196130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26389 0039d316-1c4b-4281-b951-d872f2087c98
* Add checks to DEBUG mode that no instance of URLRequest or URLFetcher ↵ericroman@google.com2009-08-111-0/+106
survives the destruction of the IO thread. This checking is done by introducing a new helper class to base called LeakTracker. Classes that you want to check for leaks just need to extend LeakTracker. The reason I am picking on URLFetcher / URLRequest, is I believe we have a bug that is making an instance of URLFetcher to outlive the IO thread. This causes various sorts of badness. For example: If URLFetcher survives the IO thread, then URLRequestContext remains referenced and therefore also survives IO thread. In turn HostResolverImpl survives the IO thread, so any outstanding resolve requests are NOT cancelled before the IO thread is decomissioned. So now, when the worker thread doing the DNS resolve finally finishes (assuming it finishes before the rogue URLRequest is destroyed), it post the result to a defunct message loop. KAB00m! (http://crbug.com/15513) Moreover, I believe we hit this same problem sporadically in AutomationProxyTest.AutocompleteGetSetText -- the test is flaky on the buildbots, and I've seen DCHECKs which suggest it is related to this issue. BUG=http://crbug.com/18372 Review URL: http://codereview.chromium.org/160447 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23084 0039d316-1c4b-4281-b951-d872f2087c98