| Index: base/threading/platform_thread_mac.mm
|
| diff --git a/base/threading/platform_thread_mac.mm b/base/threading/platform_thread_mac.mm
|
| index fd40d7952c3bc9d1bf7c049629fce7a74b135373..a9c347a5b53f4874bab0330e62f14f3e737d8091 100644
|
| --- a/base/threading/platform_thread_mac.mm
|
| +++ b/base/threading/platform_thread_mac.mm
|
| @@ -42,14 +42,14 @@ void InitThreading() {
|
| }
|
|
|
| // static
|
| -void PlatformThread::SetName(const char* name) {
|
| +void PlatformThread::SetName(const std::string& name) {
|
| ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
|
| tracked_objects::ThreadData::InitializeThreadContext(name);
|
|
|
| // Mac OS X does not expose the length limit of the name, so
|
| // hardcode it.
|
| const int kMaxNameLength = 63;
|
| - std::string shortened_name = std::string(name).substr(0, kMaxNameLength);
|
| + std::string shortened_name = name.substr(0, kMaxNameLength);
|
| // pthread_setname() fails (harmlessly) in the sandbox, ignore when it does.
|
| // See http://crbug.com/47058
|
| pthread_setname_np(shortened_name.c_str());
|
|
|