mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=903270 set thread name for initial event of NS_NewNamedThread() r=dougt
--HG-- extra : transplant_source : %E7%24%5Be%ED.%F3HH%9A%9E%02r%EB%29%CD%EDf%09%F1
This commit is contained in:
parent
755583ce80
commit
0a31758810
@ -71,9 +71,15 @@ NS_NewNamedThread(const char (&name)[LEN],
|
||||
nsIRunnable *initialEvent = nullptr,
|
||||
uint32_t stackSize = nsIThreadManager::DEFAULT_STACK_SIZE)
|
||||
{
|
||||
nsresult rv = NS_NewThread(result, initialEvent, stackSize);
|
||||
NS_SetThreadName<LEN>(*result, name);
|
||||
return rv;
|
||||
nsresult rv = NS_NewThread(result, nullptr, stackSize);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
NS_SetThreadName<LEN>(*result, name);
|
||||
if (initialEvent) {
|
||||
rv = (*result)->Dispatch(initialEvent, NS_DISPATCH_NORMAL);
|
||||
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Initial event dispatch failed");
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user