From 2b18084d40261a356b377dd6aa4a5bd8bdd2a285 Mon Sep 17 00:00:00 2001 From: stefan Date: Mon, 14 Sep 2015 07:53:38 -0700 Subject: [PATCH] Only allow static strings as ProcessThread names. Review URL: https://codereview.webrtc.org/1336293002 Cr-Commit-Position: refs/heads/master@{#9932} --- webrtc/modules/utility/source/process_thread_impl.cc | 2 +- webrtc/modules/utility/source/process_thread_impl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webrtc/modules/utility/source/process_thread_impl.cc b/webrtc/modules/utility/source/process_thread_impl.cc index eab0d9a117..51b7494d8f 100644 --- a/webrtc/modules/utility/source/process_thread_impl.cc +++ b/webrtc/modules/utility/source/process_thread_impl.cc @@ -77,7 +77,7 @@ void ProcessThreadImpl::Start() { } thread_ = ThreadWrapper::CreateThread(&ProcessThreadImpl::Run, this, - thread_name_.c_str()); + thread_name_); CHECK(thread_->Start()); } diff --git a/webrtc/modules/utility/source/process_thread_impl.h b/webrtc/modules/utility/source/process_thread_impl.h index 53b5d591a3..5101ea9ad0 100644 --- a/webrtc/modules/utility/source/process_thread_impl.h +++ b/webrtc/modules/utility/source/process_thread_impl.h @@ -76,7 +76,7 @@ class ProcessThreadImpl : public ProcessThread { // TODO(tommi): Support delayed tasks. std::queue queue_; bool stop_; - std::string thread_name_; + const char* thread_name_; }; } // namespace webrtc