diff options
author | ahendrickson@google.com <ahendrickson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 22:05:54 +0000 |
---|---|---|
committer | ahendrickson@google.com <ahendrickson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 22:05:54 +0000 |
commit | 0935be38b377b3ea8d4816444333d6f2ce91b22c (patch) | |
tree | f3034e4a7e4100ef9f128804d252ef3011cdbc14 | |
parent | a9d59460c07913177e8bf149276a433403783c88 (diff) | |
download | chromium_src-0935be38b377b3ea8d4816444333d6f2ce91b22c.zip chromium_src-0935be38b377b3ea8d4816444333d6f2ce91b22c.tar.gz chromium_src-0935be38b377b3ea8d4816444333d6f2ce91b22c.tar.bz2 |
Remove memory leak from the SpdyNetworkTransactionTest:ServerPush
unit test, and its suppression.
Another issue's (1321002) CL accidentally checked in a preliminary fix; this cleans it up.
BUG=39378
TEST=Valgrind
Review URL: http://codereview.chromium.org/1378009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42833 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/spdy/spdy_network_transaction_unittest.cc | 7 | ||||
-rwxr-xr-x | tools/valgrind/memcheck/suppressions.txt | 31 |
2 files changed, 3 insertions, 35 deletions
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc index 12eaadc..7520b38 100644 --- a/net/spdy/spdy_network_transaction_unittest.cc +++ b/net/spdy/spdy_network_transaction_unittest.cc @@ -1635,10 +1635,8 @@ TEST_F(SpdyNetworkTransactionTest, ServerPush) { MockRead(true, reinterpret_cast<const char*>(kPushBodyFrame4), // 6 arraysize(kPushBodyFrame4) - 1, 9), MockRead(true, ERR_IO_PENDING, MockRead::STOPLOOP | 10), // 7 - MockRead(true, reinterpret_cast<const char*>(kPushBodyFrame4), // 8 - arraysize(kPushBodyFrame4) - 1, 11), - MockRead(true, reinterpret_cast<const char*>(kPushBodyFrame4), // 9 - arraysize(kPushBodyFrame4) - 1, 12) + // So we can do a final CompleteRead(), which cleans up memory. + MockRead(true, NULL, 0, 11) // 8 }; // We disable SSL for this test. @@ -1713,6 +1711,7 @@ TEST_F(SpdyNetworkTransactionTest, ServerPush) { // Complete the next read now and teardown. data->CompleteRead(); + // Verify that we consumed all test data. EXPECT_TRUE(data->at_read_eof()); EXPECT_TRUE(data->at_write_eof()); diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index 1e34f07..9eab175 100755 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt @@ -2684,34 +2684,3 @@ fun:_ZN23WebPluginDelegatePepper28DeviceAudioInitializeContextEPK27_NPDeviceContextAudioConfigP21_NPDeviceContextAudio ... } -{ - bug_39378 - Memcheck:Leak - fun:_Znw* - fun:_ZN3net74_GLOBAL__N_net_spdy_spdy_network_transaction_unittest.cc_00000000_FD2AFDBA19SessionDependenciesC1Ev - fun:_ZN3net42SpdyNetworkTransactionTest_ServerPush_Test8TestBodyEv - fun:_ZN7testing4Test3RunEv - fun:_ZN7testing8internal12TestInfoImpl3RunEv - fun:_ZN7testing8TestCase3RunEv - fun:_ZN7testing8internal12UnitTestImpl11RunAllTestsEv - fun:_ZN7testing8UnitTest3RunEv - fun:_ZN9TestSuite3RunEv - fun:main -} -{ - bug_39378_2 - Memcheck:Leak - fun:_Znw* - fun:_ZN9__gnu_cxx13new_allocatorISt10_List_nodeI13scoped_refptrIN3net11SpdySessionEEEE8allocateEjPKv - fun:_ZNSt10_List_baseI13scoped_refptrIN3net11SpdySessionEESaIS3_EE11_M_get_nodeEv - fun:_ZNSt4listI13scoped_refptrIN3net11SpdySessionEESaIS3_EE14_M_create_nodeERKS3_ - fun:_ZNSt4listI13scoped_refptrIN3net11SpdySessionEESaIS3_EE9_M_insertESt14_List_iteratorIS3_ERKS3_ - fun:_ZNSt4listI13scoped_refptrIN3net11SpdySessionEESaIS3_EE9push_backERKS3_ - fun:_ZN3net15SpdySessionPool3GetERKNS_12HostPortPairEPNS_18HttpNetworkSessionE - fun:_ZN3net22SpdyNetworkTransaction16DoInitConnectionEv - fun:_ZN3net22SpdyNetworkTransaction6DoLoopEi - fun:_ZN3net22SpdyNetworkTransaction5StartEPKNS_15HttpRequestInfoEP14CallbackRunnerI6Tuple1IiEERKNS_11BoundNetLogE - fun:_ZN3net11MakeRequestE13scoped_refptrINS_18HttpNetworkSessionEES0_INS_17OrderedSocketDataEERK4GURLRKSsiiPNS_16HttpResponseInfoE - fun:_ZN3net42SpdyNetworkTransactionTest_ServerPush_Test8TestBodyEv - ... -} |