Bug 1024732 - Don't set PJS helper thread state to TERMINATED on error when starting the helper threads. (r=nmatsakis)

This commit is contained in:
Shu-yu Guo 2014-06-13 15:11:12 -07:00
parent e1d1268cfc
commit c581483075

View File

@ -141,18 +141,11 @@ ThreadPoolWorker::start()
// Set state to active now, *before* the thread starts:
state_ = ACTIVE;
if (!PR_CreateThread(PR_USER_THREAD,
HelperThreadMain, this,
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
WORKER_THREAD_STACK_SIZE))
{
// If the thread failed to start, call it TERMINATED.
state_ = TERMINATED;
return false;
}
return true;
return PR_CreateThread(PR_USER_THREAD,
HelperThreadMain, this,
PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
PR_UNJOINABLE_THREAD,
WORKER_THREAD_STACK_SIZE);
#endif
}