Bug 1006695 - Mark JS worker threads 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 e5a1dbdf70
commit 828e89a72d

View File

@ -23,6 +23,10 @@
#include "jsobjinlines.h"
#include "jsscriptinlines.h"
#ifdef MOZ_NUWA_PROCESS
# include "ipc/Nuwa.h"
#endif
using namespace js;
using mozilla::ArrayLength;
@ -724,6 +728,14 @@ 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();
}