Bug 1323100 - Use nsThreadPoolNaming::GetNextThreadName and NS_NewNamedThread for the mozStorage thread. r=froydnj
MozReview-Commit-ID: 145CjwiQawB
This commit is contained in:
@@ -589,14 +589,13 @@ Connection::getAsyncExecutionTarget()
|
||||
return nullptr;
|
||||
|
||||
if (!mAsyncExecutionThread) {
|
||||
nsresult rv = ::NS_NewThread(getter_AddRefs(mAsyncExecutionThread));
|
||||
static nsThreadPoolNaming naming;
|
||||
nsresult rv = NS_NewNamedThread(naming.GetNextThreadName("mozStorage"),
|
||||
getter_AddRefs(mAsyncExecutionThread));
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to create async thread.");
|
||||
return nullptr;
|
||||
}
|
||||
static nsThreadPoolNaming naming;
|
||||
naming.SetThreadPoolName(NS_LITERAL_CSTRING("mozStorage"),
|
||||
mAsyncExecutionThread);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
Reference in New Issue
Block a user