mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1006695 - Mark JS worker threads to be known by Nuwa. r=luke
They will be recreated in the spawned process.
This commit is contained in:
parent
895829d1d8
commit
b76ce542de
@ -719,11 +719,26 @@ WorkerThread::destroy()
|
|||||||
threadData.destroy();
|
threadData.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_NUWA_PROCESS
|
||||||
|
extern "C" {
|
||||||
|
MFBT_API bool IsNuwaProcess();
|
||||||
|
MFBT_API void NuwaMarkCurrentThread(void (*recreate)(void *), void *arg);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
void
|
void
|
||||||
WorkerThread::ThreadMain(void *arg)
|
WorkerThread::ThreadMain(void *arg)
|
||||||
{
|
{
|
||||||
PR_SetCurrentThreadName("Analysis Helper");
|
PR_SetCurrentThreadName("Analysis Helper");
|
||||||
|
|
||||||
|
#ifdef MOZ_NUWA_PROCESS
|
||||||
|
if (IsNuwaProcess()) {
|
||||||
|
JS_ASSERT(NuwaMarkCurrentThread != nullptr);
|
||||||
|
NuwaMarkCurrentThread(nullptr, nullptr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static_cast<WorkerThread *>(arg)->threadLoop();
|
static_cast<WorkerThread *>(arg)->threadLoop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user