diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-21 16:57:45 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-21 16:57:45 +0000 |
commit | 807c01ae2f590bc809312e9be809baa6ac38d5c7 (patch) | |
tree | 6fb7678efd51e4fe3db8a6df45b3c300188a3cb0 /net/spdy/spdy_session_unittest.cc | |
parent | fd4d226549034acc7b249e0eff537089bd0cd6db (diff) | |
download | chromium_src-807c01ae2f590bc809312e9be809baa6ac38d5c7.zip chromium_src-807c01ae2f590bc809312e9be809baa6ac38d5c7.tar.gz chromium_src-807c01ae2f590bc809312e9be809baa6ac38d5c7.tar.bz2 |
SPDY: Fix unittest-only leak.
We leaked the SpdySessionPool and SpdySession in the test since they have a circular reference.
This is usually broken by a GOAWAY frame in real code, but we have to manually break the circular reference here.
BUG=42084
Review URL: http://codereview.chromium.org/1695001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45198 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session_unittest.cc')
-rw-r--r-- | net/spdy/spdy_session_unittest.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc index 2dd0820..4e95263 100644 --- a/net/spdy/spdy_session_unittest.cc +++ b/net/spdy/spdy_session_unittest.cc @@ -138,7 +138,12 @@ TEST_F(SpdySessionTest, GoAway) { scoped_refptr<SpdySession> session2 = spdy_session_pool->Get(test_host_port_pair, http_session.get()); + // Delete the first session. session = NULL; + + // Delete the second session. + spdy_session_pool->Remove(session2); + session2 = NULL; } } // namespace |