Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: webrtc/base/thread.cc

Issue 2828223002: Delete method MessageQueue::set_socketserver (Closed)
Patch Set: Delete redundant private: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/base/thread.cc
diff --git a/webrtc/base/thread.cc b/webrtc/base/thread.cc
index 9a71c1aa3fd352130677641d54b2ff8a79ce5d96..471460987aed87e44964de1867ccad669c2e1889 100644
--- a/webrtc/base/thread.cc
+++ b/webrtc/base/thread.cc
@@ -528,4 +528,15 @@ AutoThread::~AutoThread() {
}
}
+AutoSocketServerThread::AutoSocketServerThread(SocketServer* ss)
+ : Thread(ss) {
+ old_thread_ = ThreadManager::Instance()->CurrentThread();
Taylor Brandstetter 2017/04/28 02:59:34 Does it need to do this? Or can it do "DCHECK(!Cur
nisse-webrtc 2017/04/28 09:46:52 PhysicalSocketTest is part of the webrtc_nonparall
Taylor Brandstetter 2017/04/28 16:59:45 I wasn't thinking when I left this comment; I was
+ rtc::ThreadManager::Instance()->SetCurrentThread(this);
+}
+
+AutoSocketServerThread::~AutoSocketServerThread() {
+ RTC_DCHECK(ThreadManager::Instance()->CurrentThread() == this);
+ rtc::ThreadManager::Instance()->SetCurrentThread(old_thread_);
+}
+
} // namespace rtc

Powered by Google App Engine
This is Rietveld 408576698