mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00: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
33f06c9462
commit
4c6d6c9b03
@ -719,11 +719,26 @@ WorkerThread::destroy()
|
||||
threadData.destroy();
|
||||
}
|
||||
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
extern "C" {
|
||||
MFBT_API bool IsNuwaProcess();
|
||||
MFBT_API void NuwaMarkCurrentThread(void (*recreate)(void *), void *arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* static */
|
||||
void
|
||||
WorkerThread::ThreadMain(void *arg)
|
||||
{
|
||||
PR_SetCurrentThreadName("Analysis Helper");
|
||||
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
if (IsNuwaProcess()) {
|
||||
JS_ASSERT(NuwaMarkCurrentThread != nullptr);
|
||||
NuwaMarkCurrentThread(nullptr, nullptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
static_cast<WorkerThread *>(arg)->threadLoop();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user