зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1323100 - Use nsThreadPoolNaming::GetNextThreadName and NS_NewNamedThread in nsThreadPool. r=froydnj
MozReview-Commit-ID: 6IB5yvJtAQm --HG-- extra : rebase_source : d4d9bf2dab3e75821e931a11fa0a16f6ee1eb970
This commit is contained in:
Родитель
5eb9438218
Коммит
db237ad713
|
@ -104,8 +104,9 @@ nsThreadPool::PutEvent(already_AddRefed<nsIRunnable> aEvent, uint32_t aFlags)
|
|||
}
|
||||
|
||||
nsCOMPtr<nsIThread> thread;
|
||||
nsThreadManager::get().NewThread(0, stackSize, getter_AddRefs(thread));
|
||||
if (NS_WARN_IF(!thread)) {
|
||||
nsresult rv = NS_NewNamedThread(mThreadNaming.GetNextThreadName(mName),
|
||||
getter_AddRefs(thread), nullptr, stackSize);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
|
@ -152,8 +153,6 @@ nsThreadPool::ShutdownThread(nsIThread* aThread)
|
|||
NS_IMETHODIMP
|
||||
nsThreadPool::Run()
|
||||
{
|
||||
mThreadNaming.SetThreadPoolName(mName);
|
||||
|
||||
LOG(("THRD-P(%p) enter %s\n", this, mName.BeginReading()));
|
||||
|
||||
nsCOMPtr<nsIThread> current;
|
||||
|
|
Загрузка…
Ссылка в новой задаче