diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 18:50:15 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-24 18:50:15 +0000 |
commit | 9f7c4fdc2d5fab8cca68ddb50217db9b62b525e3 (patch) | |
tree | 2379f9b7fa6cd9ffff3a86039f55b5ddb66d247e /net/http | |
parent | 562d8c4bc0559df9e3265430f8903ee5bcccdbe2 (diff) | |
download | chromium_src-9f7c4fdc2d5fab8cca68ddb50217db9b62b525e3.zip chromium_src-9f7c4fdc2d5fab8cca68ddb50217db9b62b525e3.tar.gz chromium_src-9f7c4fdc2d5fab8cca68ddb50217db9b62b525e3.tar.bz2 |
Flip: Fix a bunch of leaks.
FlipIOBuffer::release() was broken. It called release() on scoped_refptrs which does not decrease refcount, hence it leaked IOBuffers and FlipStreams.
Redo the memory management for FlipSession. Stop using raw pointers in FlipSessionPool to hold onto FlipSession. FlipSessionPool uses scoped_refptr now to track Fli
pSessions. Instead of having FlipSession call Release() on itself, it now calls FlipSessionPool to remove itself from the pool when the tcp connection is closed.
In FlipStreamTest, manually call FlipSessionPool::Remove() since there is no tcp connection event to trigger FlipSession to remove itself.
BUG=http://crbug.com/28493
Review URL: http://codereview.chromium.org/438014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_session.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h index 11e42f4..f2e76e2 100644 --- a/net/http/http_network_session.h +++ b/net/http/http_network_session.h @@ -38,7 +38,9 @@ class HttpNetworkSession : public base::RefCounted<HttpNetworkSession> { HostResolver* host_resolver() { return host_resolver_; } ProxyService* proxy_service() { return proxy_service_; } SSLConfigService* ssl_config_service() { return ssl_config_service_; } - FlipSessionPool* flip_session_pool() { return flip_session_pool_; } + const scoped_refptr<FlipSessionPool>& flip_session_pool() { + return flip_session_pool_; + } static void set_max_sockets_per_group(int socket_count); |