Bug 1323100 - Use nsThreadPoolNaming::GetNextThreadName and NS_NewNamedThread for the mozStorage thread. r=froydnj

MozReview-Commit-ID: 145CjwiQawB
This commit is contained in:
Markus Stange
2016-12-20 14:20:15 +01:00
parent c32642ec99
commit 60a9f831b2

View File

@@ -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