From b2ffa68884e0657fe59aa95ab534c4062b91fd17 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Fri, 10 Jun 2011 12:41:35 +0000 Subject: [PATCH] removed isolates from d8 since they are not necessary anymore git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8266 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/d8-debug.cc | 6 +++--- src/d8-debug.h | 9 ++++----- src/d8.cc | 5 ++--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/d8-debug.cc b/src/d8-debug.cc index 3df8693..8a3886c 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 90a9ce9..34b56df 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 fe3bb2d..5a52380 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 files) + ShellThread(int no, i::Vector 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(files, size)); thread->Start(); threads.Add(thread); -- 2.7.4