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

Unified Diff: webrtc/base/thread_darwin.mm

Issue 2833993003: Move autowrap from ThreadManager constructor to Thread::Current. (Closed)
Patch Set: Limit autowrap to main thread only. New method ThreadManager::IsMainThread. 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
« no previous file with comments | « webrtc/base/thread.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/thread_darwin.mm
diff --git a/webrtc/base/thread_darwin.mm b/webrtc/base/thread_darwin.mm
index 5bcc5c8c06b220a67baad5182789c7c1fe983e47..5f2227d839c0f58f8acadf5ad4a744c3e1d03a97 100644
--- a/webrtc/base/thread_darwin.mm
+++ b/webrtc/base/thread_darwin.mm
@@ -39,22 +39,13 @@ void InitCocoaMultiThreading() {
namespace rtc {
ThreadManager::ThreadManager() {
+ main_thread_ref_ = CurrentThreadRef();
pthread_key_create(&key_, nullptr);
-#ifndef NO_MAIN_THREAD_WRAPPING
- WrapCurrentThread();
-#endif
// This is necessary to alert the cocoa runtime of the fact that
// we are running in a multithreaded environment.
InitCocoaMultiThreading();
}
-ThreadManager::~ThreadManager() {
- @autoreleasepool {
- UnwrapCurrentThread();
- pthread_key_delete(key_);
- }
-}
-
// static
void* Thread::PreRun(void* pv) {
ThreadInit* init = static_cast<ThreadInit*>(pv);
« no previous file with comments | « webrtc/base/thread.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698