diff options
author | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-06 23:40:54 +0000 |
---|---|---|
committer | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-06 23:40:54 +0000 |
commit | 1f5f8e283a98538770f7ced9e0f64e66dcfbedef (patch) | |
tree | 2046be6ff725c29c365d1768e5a57433d2d78494 /net/url_request | |
parent | 504a7f2dbd7d280ae29f00a27580b41a74fcd8f9 (diff) | |
download | chromium_src-1f5f8e283a98538770f7ced9e0f64e66dcfbedef.zip chromium_src-1f5f8e283a98538770f7ced9e0f64e66dcfbedef.tar.gz chromium_src-1f5f8e283a98538770f7ced9e0f64e66dcfbedef.tar.bz2 |
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
Diffstat (limited to 'net/url_request')
-rw-r--r-- | net/url_request/url_request_context.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/url_request/url_request_context.cc b/net/url_request/url_request_context.cc index e4f7f31..5b7af63 100644 --- a/net/url_request/url_request_context.cc +++ b/net/url_request/url_request_context.cc @@ -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() << "."; } } |