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

Unified Diff: base/threading/platform_thread_mac.mm

Issue 1845753006: Don't create redundant ThreadData for Worker Threads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment Created 4 years, 7 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: base/threading/platform_thread_mac.mm
diff --git a/base/threading/platform_thread_mac.mm b/base/threading/platform_thread_mac.mm
index 51f3621af2d999a73295967bf14db42425b90302..954a2bc64043a9f6805779298364e6927c0dfa88 100644
--- a/base/threading/platform_thread_mac.mm
+++ b/base/threading/platform_thread_mac.mm
@@ -49,9 +49,10 @@ void InitThreading() {
}
// static
-void PlatformThread::SetName(const std::string& name) {
+void PlatformThread::SetName(const std::string& name, bool is_worker_thread) {
ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
- tracked_objects::ThreadData::InitializeThreadContext(name);
+ if (!is_worker_thread)
+ tracked_objects::ThreadData::InitializeThreadContext(name);
// Mac OS X does not expose the length limit of the name, so
// hardcode it.

Powered by Google App Engine
This is Rietveld 408576698