diff options
-rw-r--r-- | remoting/jingle_glue/iq_sender.h | 5 | ||||
-rw-r--r-- | remoting/jingle_glue/iq_sender_unittest.cc | 5 | ||||
-rw-r--r-- | tools/heapcheck/suppressions.txt | 7 | ||||
-rw-r--r-- | tools/valgrind/memcheck/suppressions.txt | 8 |
4 files changed, 6 insertions, 19 deletions
diff --git a/remoting/jingle_glue/iq_sender.h b/remoting/jingle_glue/iq_sender.h index 77b48ee..2696b80 100644 --- a/remoting/jingle_glue/iq_sender.h +++ b/remoting/jingle_glue/iq_sender.h @@ -37,14 +37,15 @@ class IqSender : public SignalStrategy::Listener { // received. Destroy the returned IqRequest to cancel the callback. // Takes ownership of |stanza|. Caller must take ownership of the // result. Result must be destroyed before sender is destroyed. - IqRequest* SendIq(buzz::XmlElement* stanza, const ReplyCallback& callback); + IqRequest* SendIq(buzz::XmlElement* stanza, + const ReplyCallback& callback) WARN_UNUSED_RESULT; // Same as above, but also formats the message. Takes ownership of // |iq_body|. IqRequest* SendIq(const std::string& type, const std::string& addressee, buzz::XmlElement* iq_body, - const ReplyCallback& callback); + const ReplyCallback& callback) WARN_UNUSED_RESULT; // SignalStrategy::Listener implementation. virtual bool OnIncomingStanza(const buzz::XmlElement* stanza) OVERRIDE; diff --git a/remoting/jingle_glue/iq_sender_unittest.cc b/remoting/jingle_glue/iq_sender_unittest.cc index 733a084..f9dc8af 100644 --- a/remoting/jingle_glue/iq_sender_unittest.cc +++ b/remoting/jingle_glue/iq_sender_unittest.cc @@ -62,8 +62,9 @@ TEST_F(IqSenderTest, SendIq) { .WillOnce(Return(kStanzaId)); EXPECT_CALL(signal_strategy_, SendStanza(_)) .WillOnce(DoAll(SaveArg<0>(&sent_stanza), Return(true))); - sender_->SendIq(kType, kTo, iq_body, base::Bind( - &MockCallback::OnReply, base::Unretained(&callback_))); + scoped_ptr<IqRequest> request( + sender_->SendIq(kType, kTo, iq_body, base::Bind( + &MockCallback::OnReply, base::Unretained(&callback_)))); std::string expected_xml_string = base::StringPrintf( diff --git a/tools/heapcheck/suppressions.txt b/tools/heapcheck/suppressions.txt index 40fd4dc..2e7b3c5 100644 --- a/tools/heapcheck/suppressions.txt +++ b/tools/heapcheck/suppressions.txt @@ -1668,13 +1668,6 @@ fun:PluginLoaderPosix::GetPluginsToLoad } { - bug_102983 - Heapcheck:Leak - fun:remoting::IqSender::SendIq - fun:remoting::IqSender::SendIq - fun:remoting::IqSenderTest_SendIq_Test::TestBody -} -{ bug_102988_a Heapcheck:Leak fun:net::CryptoModule::CreateFromHandle diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index 2e380af..6088fa6 100644 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt @@ -5186,14 +5186,6 @@ fun:_ZN4base8internal8Invoker1ILb0ENS0_15InvokerStorage1IM17PluginLoaderPosixFvvE13scoped_refptrIS3_EEES5_E8DoInvokeEPNS0_18InvokerStorageBaseE } { - bug_102983 - Memcheck:Leak - fun:_Znw* - fun:_ZN8remoting8IqSender6SendIqEPN4buzz10XmlElementERKN4base8CallbackIFvPKS2_EEE - fun:_ZN8remoting8IqSender6SendIqERKSsS2_PN4buzz10XmlElementERKN4base8CallbackIFvPKS4_EEE - fun:_ZN8remoting24IqSenderTest_SendIq_Test8TestBodyEv -} -{ bug_102988 Memcheck:Leak fun:_Znw* |