| Index: webrtc/system_wrappers/source/critical_section_unittest.cc
|
| diff --git a/webrtc/system_wrappers/source/critical_section_unittest.cc b/webrtc/system_wrappers/source/critical_section_unittest.cc
|
| index 347cb55c91ae21013d7cce2243fd3aaf2605abb5..9abf8b8017e6ad38d93ac406a379d2c5832d6995 100644
|
| --- a/webrtc/system_wrappers/source/critical_section_unittest.cc
|
| +++ b/webrtc/system_wrappers/source/critical_section_unittest.cc
|
| @@ -78,10 +78,10 @@ TEST_F(CritSectTest, ThreadWakesOnce) NO_THREAD_SAFETY_ANALYSIS {
|
| CriticalSectionWrapper* crit_sect =
|
| CriticalSectionWrapper::CreateCriticalSection();
|
| ProtectedCount count(crit_sect);
|
| - rtc::scoped_ptr<PlatformThread> thread = PlatformThread::CreateThread(
|
| + rtc::PlatformThread thread(
|
| &LockUnlockThenStopRunFunction, &count, "ThreadWakesOnce");
|
| crit_sect->Enter();
|
| - ASSERT_TRUE(thread->Start());
|
| + thread.Start();
|
| SwitchProcess();
|
| // The critical section is of reentrant mode, so this should not release
|
| // the lock, even though count.Count() locks and unlocks the critical section
|
| @@ -90,7 +90,7 @@ TEST_F(CritSectTest, ThreadWakesOnce) NO_THREAD_SAFETY_ANALYSIS {
|
| ASSERT_EQ(0, count.Count());
|
| crit_sect->Leave(); // This frees the thread to act.
|
| EXPECT_TRUE(WaitForCount(1, &count));
|
| - EXPECT_TRUE(thread->Stop());
|
| + thread.Stop();
|
| delete crit_sect;
|
| }
|
|
|
| @@ -105,10 +105,10 @@ TEST_F(CritSectTest, ThreadWakesTwice) NO_THREAD_SAFETY_ANALYSIS {
|
| CriticalSectionWrapper* crit_sect =
|
| CriticalSectionWrapper::CreateCriticalSection();
|
| ProtectedCount count(crit_sect);
|
| - rtc::scoped_ptr<PlatformThread> thread = PlatformThread::CreateThread(
|
| + rtc::PlatformThread thread(
|
| &LockUnlockRunFunction, &count, "ThreadWakesTwice");
|
| crit_sect->Enter(); // Make sure counter stays 0 until we wait for it.
|
| - ASSERT_TRUE(thread->Start());
|
| + thread.Start();
|
| crit_sect->Leave();
|
|
|
| // The thread is capable of grabbing the lock multiple times,
|
| @@ -128,7 +128,7 @@ TEST_F(CritSectTest, ThreadWakesTwice) NO_THREAD_SAFETY_ANALYSIS {
|
|
|
| SwitchProcess();
|
| EXPECT_TRUE(WaitForCount(count_before + 1, &count));
|
| - EXPECT_TRUE(thread->Stop());
|
| + thread.Stop();
|
| delete crit_sect;
|
| }
|
|
|
|
|