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

Unified Diff: base/threading/platform_thread_win.cc

Issue 1123833003: Revert of Revert some other possible suspects of a 0.43% size increase of setup.exe: https://build.chromium.o… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « base/threading/platform_thread_mac.mm ('k') | base/threading/simple_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/platform_thread_win.cc
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index b9f7a5648ad3ff2350e12e728a28a7158f75bac3..4eb2cb2b33d38004952060a1658b02382e733818 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -154,7 +154,7 @@
}
// static
-void PlatformThread::SetName(const char* name) {
+void PlatformThread::SetName(const std::string& name) {
ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
// On Windows only, we don't need to tell the profiler about the "BrokerEvent"
@@ -163,7 +163,7 @@
// which would also (as a side effect) initialize the profiler in this unused
// context, including setting up thread local storage, etc. The performance
// impact is not terrible, but there is no reason to do initialize it.
- if (0 != strcmp(name, "BrokerEvent"))
+ if (name != "BrokerEvent")
tracked_objects::ThreadData::InitializeThreadContext(name);
// The debugger needs to be around to catch the name in the exception. If
@@ -173,7 +173,7 @@
if (!::IsDebuggerPresent() && !base::debug::IsBinaryInstrumented())
return;
- SetNameInternal(CurrentId(), name);
+ SetNameInternal(CurrentId(), name.c_str());
}
// static
« no previous file with comments | « base/threading/platform_thread_mac.mm ('k') | base/threading/simple_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698