| Index: webrtc/rtc_base/thread.cc
|
| diff --git a/webrtc/rtc_base/thread.cc b/webrtc/rtc_base/thread.cc
|
| index 56a145c7d9591c2d289576465a73674c4c63eb5c..9ba0f5134903171178783402a403840fb4c77e59 100644
|
| --- a/webrtc/rtc_base/thread.cc
|
| +++ b/webrtc/rtc_base/thread.cc
|
| @@ -44,7 +44,7 @@ Thread* Thread::Current() {
|
| #ifndef NO_MAIN_THREAD_WRAPPING
|
| // Only autowrap the thread which instantiated the ThreadManager.
|
| if (!thread && manager->IsMainThread()) {
|
| - thread = new Thread();
|
| + thread = new Thread(SocketServer::CreateDefault());
|
| thread->WrapCurrentWithThreadManager(manager, true);
|
| }
|
| #endif
|
| @@ -87,7 +87,7 @@ void ThreadManager::SetCurrentThread(Thread *thread) {
|
| Thread *ThreadManager::WrapCurrentThread() {
|
| Thread* result = CurrentThread();
|
| if (nullptr == result) {
|
| - result = new Thread();
|
| + result = new Thread(SocketServer::CreateDefault());
|
| result->WrapCurrentWithThreadManager(this, true);
|
| }
|
| return result;
|
| @@ -115,6 +115,7 @@ Thread::ScopedDisallowBlockingCalls::~ScopedDisallowBlockingCalls() {
|
| thread_->SetAllowBlockingCalls(previous_state_);
|
| }
|
|
|
| +// DEPRECATED.
|
| Thread::Thread() : Thread(SocketServer::CreateDefault()) {}
|
|
|
| Thread::Thread(SocketServer* ss)
|
| @@ -520,7 +521,7 @@ bool Thread::WrapCurrentWithThreadManager(ThreadManager* thread_manager,
|
| return true;
|
| }
|
|
|
| -AutoThread::AutoThread() {
|
| +AutoThread::AutoThread() : Thread(SocketServer::CreateDefault()) {
|
| if (!ThreadManager::Instance()->CurrentThread()) {
|
| ThreadManager::Instance()->SetCurrentThread(this);
|
| }
|
|
|