diff --git a/src/d8-debug.cc b/src/d8-debug.cc index 3df869348b..8a3886c676 100644 --- a/src/d8-debug.cc +++ b/src/d8-debug.cc @@ -159,7 +159,7 @@ void HandleDebugEvent(DebugEvent event, void RunRemoteDebugger(int port) { - RemoteDebugger debugger(i::Isolate::Current(), port); + RemoteDebugger debugger(port); debugger.Run(); } @@ -186,11 +186,11 @@ void RemoteDebugger::Run() { } // Start the receiver thread. - ReceiverThread receiver(isolate_, this); + ReceiverThread receiver(this); receiver.Start(); // Start the keyboard thread. - KeyboardThread keyboard(isolate_, this); + KeyboardThread keyboard(this); keyboard.Start(); PrintPrompt(); diff --git a/src/d8-debug.h b/src/d8-debug.h index 90a9ce921e..34b56df7f2 100644 --- a/src/d8-debug.h +++ b/src/d8-debug.h @@ -53,11 +53,11 @@ class ReceiverThread; // Remote debugging class. class RemoteDebugger { public: - RemoteDebugger(i::Isolate* isolate, int port) + RemoteDebugger(int port) : port_(port), event_access_(i::OS::CreateMutex()), event_available_(i::OS::CreateSemaphore(0)), - head_(NULL), tail_(NULL), isolate_(isolate) {} + head_(NULL), tail_(NULL) {} void Run(); // Handle events from the subordinate threads. @@ -89,7 +89,6 @@ class RemoteDebugger { i::Semaphore* event_available_; RemoteDebuggerEvent* head_; RemoteDebuggerEvent* tail_; - i::Isolate* isolate_; friend class ReceiverThread; }; @@ -98,7 +97,7 @@ class RemoteDebugger { // Thread reading from debugged V8 instance. class ReceiverThread: public i::Thread { public: - ReceiverThread(i::Isolate* isolate, RemoteDebugger* remote_debugger) + ReceiverThread(RemoteDebugger* remote_debugger) : Thread("d8:ReceiverThrd"), remote_debugger_(remote_debugger) {} ~ReceiverThread() {} @@ -113,7 +112,7 @@ class ReceiverThread: public i::Thread { // Thread reading keyboard input. class KeyboardThread: public i::Thread { public: - explicit KeyboardThread(i::Isolate* isolate, RemoteDebugger* remote_debugger) + explicit KeyboardThread(RemoteDebugger* remote_debugger) : Thread("d8:KeyboardThrd"), remote_debugger_(remote_debugger) {} ~KeyboardThread() {} diff --git a/src/d8.cc b/src/d8.cc index fe3bb2d6a4..5a5238011a 100644 --- a/src/d8.cc +++ b/src/d8.cc @@ -771,7 +771,7 @@ void Shell::RunShell() { class ShellThread : public i::Thread { public: - ShellThread(i::Isolate* isolate, int no, i::Vector<const char> files) + ShellThread(int no, i::Vector<const char> files) : Thread("d8:ShellThread"), no_(no), files_(files) { } virtual void Run(); @@ -879,8 +879,7 @@ int Shell::RunMain(int argc, char* argv[]) { const char* files = ReadChars(argv[++i], &size); if (files == NULL) return 1; ShellThread* thread = - new ShellThread(i::Isolate::Current(), - threads.length(), + new ShellThread(threads.length(), i::Vector<const char>(files, size)); thread->Start(); threads.Add(thread);