Bug 1006695 - Mark workers in thread pool to be known by Nuwa. r=luke

They will be recreated in the spawned process.
This commit is contained in:
Ting-Yuan Huang 2014-05-20 18:07:22 +08:00
parent b76ce542de
commit 72d06b1a38

View File

@ -150,10 +150,25 @@ ThreadPoolWorker::start()
#endif
}
#ifdef MOZ_NUWA_PROCESS
extern "C" {
MFBT_API bool IsNuwaProcess();
MFBT_API void NuwaMarkCurrentThread(void (*recreate)(void *), void *arg);
}
#endif
void
ThreadPoolWorker::HelperThreadMain(void *arg)
{
ThreadPoolWorker *worker = (ThreadPoolWorker*) arg;
#ifdef MOZ_NUWA_PROCESS
if (IsNuwaProcess()) {
JS_ASSERT(NuwaMarkCurrentThread != nullptr);
NuwaMarkCurrentThread(nullptr, nullptr);
}
#endif
worker->helperLoop();
}