0

Log the source when a URLFetcher leak is detected

Now that we have a mechanism to detect URLFetcher leaks in test suites, we're seeing instances of leaks that are causing redness on the chromium waterfall. However, the logs do not reveal which URLFetcher caused the leak, and makes fixing the problem hard, particularly when the leak is a rarity.

This patch adds logging info that specifies the source of the leak.

TBR=willchan@chromium.org
BUG=146826
TEST=Run a test that leaks a URL, and make sure the logs indicate the source.

Review URL: https://chromiumcodereview.appspot.com/10914134

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155278 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
rsimha@chromium.org
2012-09-06 23:40:54 +00:00
parent 504a7f2dbd
commit 1f5f8e283a

@ -96,7 +96,8 @@ void URLRequestContext::AssertNoURLRequests() const {
base::debug::Alias(&has_delegate);
base::debug::Alias(&load_flags);
base::debug::Alias(&stack_trace);
CHECK(false);
CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: "
<< request->url().spec().c_str() << ".";
}
}