Index: base/threading/worker_pool_posix.cc |
diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc |
index 917565d7269a333e6cabdfe09a6971a6ac36faf1..3ddc08c540f244a4935b150ac5c295ac42dbc834 100644 |
--- a/base/threading/worker_pool_posix.cc |
+++ b/base/threading/worker_pool_posix.cc |
@@ -78,6 +78,7 @@ class WorkerThread : public PlatformThread::Delegate { |
void WorkerThread::ThreadMain() { |
const std::string name = base::StringPrintf( |
"%s/%d", name_prefix_.c_str(), PlatformThread::CurrentId()); |
+ // Note |name.c_str()| must remain valid for for the whole life of the thread. |
PlatformThread::SetName(name.c_str()); |
for (;;) { |