Bug 1323100 - Use NS_NewNamedThread for CryptoTask threads. r?froydnj
MozReview-Commit-ID: 6c6iDuGyE2X
--- a/security/manager/ssl/CryptoTask.cpp
+++ b/security/manager/ssl/CryptoTask.cpp
@@ -26,23 +26,23 @@ CryptoTask::Dispatch(const nsACString& t
// Ensure that NSS is initialized, since presumably CalculateResult
// will use NSS functions
if (!EnsureNSSInitializedChromeOrContent()) {
return NS_ERROR_FAILURE;
}
// 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);
}
NS_IMETHODIMP
CryptoTask::Run()
{
if (!NS_IsMainThread()) {