Bug 1323100 - Use NS_NewNamedThread for CryptoTask threads. r=froydnj

MozReview-Commit-ID: 6c6iDuGyE2X

--HG--
extra : rebase_source : 91520bffd5d9bd31caa27fb52cf7bd9aac86a732
This commit is contained in:
Markus Stange 2016-12-20 14:27:18 +01:00
parent 1c1cc66339
commit 275c8d787e

View File

@ -31,13 +31,13 @@ CryptoTask::Dispatch(const nsACString& taskThreadName)
}
// Can't add 'this' as the event to run, since mThread may not be set yet
nsresult rv = NS_NewThread(getter_AddRefs(mThread), nullptr,
nsIThreadManager::DEFAULT_STACK_SIZE);
nsresult rv = NS_NewNamedThread(taskThreadName, getter_AddRefs(mThread),
nullptr,
nsIThreadManager::DEFAULT_STACK_SIZE);
if (NS_FAILED(rv)) {
return rv;
}
NS_SetThreadName(mThread, taskThreadName);
// Note: event must not null out mThread!
return mThread->Dispatch(this, NS_DISPATCH_NORMAL);
}