MessageDispatchHelperThread::MessageDispatchHelperThread(Isolate* isolate)
: Thread("v8:MsgDispHelpr"),
- sem_(OS::CreateSemaphore(0)), mutex_(OS::CreateMutex()),
- already_signalled_(false) {
+ isolate_(isolate), sem_(OS::CreateSemaphore(0)),
+ mutex_(OS::CreateMutex()), already_signalled_(false) {
}
void MessageDispatchHelperThread::Run() {
- Isolate* isolate = Isolate::Current();
while (true) {
sem_->Wait();
{
already_signalled_ = false;
}
{
- Locker locker(reinterpret_cast<v8::Isolate*>(isolate));
- isolate->debugger()->CallMessageDispatchHandler();
+ Locker locker(reinterpret_cast<v8::Isolate*>(isolate_));
+ isolate_->debugger()->CallMessageDispatchHandler();
}
}
}