Fix potential deadlock in webrtc/system_wrappers/source/logging_unittest.cc.
crit_ should not be held while calling Trace. BUG=3003 R=henrike@webrtc.org, pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/17859005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6616 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
5f2c81c17f
commit
285e9bc84d
@ -65,7 +65,6 @@ char kTSanDefaultSuppressions[] =
|
||||
"deadlock:webrtc::ProcessThreadImpl::RegisterModule\n"
|
||||
"deadlock:webrtc::RTCPReceiver::SetSsrcs\n"
|
||||
"deadlock:webrtc::RTPSenderAudio::RegisterAudioPayload\n"
|
||||
"deadlock:webrtc/system_wrappers/source/logging_unittest.cc\n"
|
||||
"deadlock:webrtc::test::UdpSocketManagerPosixImpl::RemoveSocket\n"
|
||||
"deadlock:webrtc::vcm::VideoReceiver::RegisterPacketRequestCallback\n"
|
||||
"deadlock:webrtc::VideoSendStreamTest_SuspendBelowMinBitrate_Test::TestBody\n"
|
||||
|
@ -51,17 +51,16 @@ class LoggingTest : public ::testing::Test, public TraceCallback {
|
||||
}
|
||||
|
||||
void TearDown() {
|
||||
CriticalSectionScoped cs(crit_.get());
|
||||
Trace::SetTraceCallback(NULL);
|
||||
Trace::ReturnTrace();
|
||||
CriticalSectionScoped cs(crit_.get());
|
||||
ASSERT_EQ(kTraceNone, level_) << "Print() was not called";
|
||||
}
|
||||
|
||||
scoped_ptr<CriticalSectionWrapper> crit_;
|
||||
scoped_ptr<ConditionVariableWrapper> cv_;
|
||||
TraceLevel level_;
|
||||
int length_;
|
||||
std::ostringstream expected_log_;
|
||||
TraceLevel level_ GUARDED_BY(crit_);
|
||||
std::ostringstream expected_log_ GUARDED_BY(crit_);
|
||||
};
|
||||
|
||||
TEST_F(LoggingTest, LogStream) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user