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

They will be recreated in the spawned process.
This commit is contained in:
Ting-Yuan Huang 2014-05-14 00:32:00 +02:00
parent 828e89a72d
commit e1d5f09e7e

View File

@ -14,6 +14,10 @@
#include "vm/Monitor.h"
#include "vm/Runtime.h"
#ifdef MOZ_NUWA_PROCESS
# include "ipc/Nuwa.h"
#endif
using namespace js;
const size_t WORKER_THREAD_STACK_SIZE = 1*1024*1024;
@ -154,6 +158,14 @@ 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();
}