Revision: 5266
Author: [email protected]
Date: Fri Aug 13 14:31:46 2010
Log: [Isolates] Rebase and get d8 to compile.
More or less the same thing as 3028006.
Review URL: http://codereview.chromium.org/3112010
http://code.google.com/p/v8/source/detail?r=5266
Modified:
/branches/experimental/isolates/src/d8-debug.cc
/branches/experimental/isolates/src/d8-debug.h
/branches/experimental/isolates/src/d8.cc
=======================================
--- /branches/experimental/isolates/src/d8-debug.cc Fri Apr 16 05:19:47 2010
+++ /branches/experimental/isolates/src/d8-debug.cc Fri Aug 13 14:31:46 2010
@@ -150,7 +150,7 @@
void RunRemoteDebugger(int port) {
- RemoteDebugger debugger(port);
+ RemoteDebugger debugger(i::Isolate::Current(), port);
debugger.Run();
}
@@ -177,11 +177,11 @@
}
// Start the receiver thread.
- ReceiverThread receiver(this);
+ ReceiverThread receiver(isolate_, this);
receiver.Start();
// Start the keyboard thread.
- KeyboardThread keyboard(this);
+ KeyboardThread keyboard(isolate_, this);
keyboard.Start();
PrintPrompt();
=======================================
--- /branches/experimental/isolates/src/d8-debug.h Wed Mar 4 01:42:51 2009
+++ /branches/experimental/isolates/src/d8-debug.h Fri Aug 13 14:31:46 2010
@@ -53,11 +53,11 @@
// Remote debugging class.
class RemoteDebugger {
public:
- explicit RemoteDebugger(int port)
+ RemoteDebugger(i::Isolate* isolate, int port)
: port_(port),
event_access_(i::OS::CreateMutex()),
event_available_(i::OS::CreateSemaphore(0)),
- head_(NULL), tail_(NULL) {}
+ head_(NULL), tail_(NULL), isolate_(isolate) {}
void Run();
// Handle events from the subordinate threads.
@@ -89,6 +89,7 @@
i::Semaphore* event_available_;
RemoteDebuggerEvent* head_;
RemoteDebuggerEvent* tail_;
+ i::Isolate* isolate_;
friend class ReceiverThread;
};
@@ -97,8 +98,8 @@
// Thread reading from debugged V8 instance.
class ReceiverThread: public i::Thread {
public:
- explicit ReceiverThread(RemoteDebugger* remote_debugger)
- : remote_debugger_(remote_debugger) {}
+ ReceiverThread(i::Isolate* isolate, RemoteDebugger* remote_debugger)
+ : i::Thread(isolate), remote_debugger_(remote_debugger) {}
~ReceiverThread() {}
void Run();
@@ -111,8 +112,8 @@
// Thread reading keyboard input.
class KeyboardThread: public i::Thread {
public:
- explicit KeyboardThread(RemoteDebugger* remote_debugger)
- : remote_debugger_(remote_debugger) {}
+ explicit KeyboardThread(i::Isolate* isolate, RemoteDebugger*
remote_debugger)
+ : i::Thread(isolate), remote_debugger_(remote_debugger) {}
~KeyboardThread() {}
void Run();
=======================================
--- /branches/experimental/isolates/src/d8.cc Wed Jun 9 16:02:44 2010
+++ /branches/experimental/isolates/src/d8.cc Fri Aug 13 14:31:46 2010
@@ -446,11 +446,12 @@
#ifdef ENABLE_DEBUGGER_SUPPORT
// Install the debugger object in the utility scope
- i::Debug::Load();
- i::Handle<i::JSObject> debug
- = i::Handle<i::JSObject>(i::Debug::debug_context()->global());
+ i::Debug* debug = i::Isolate::Current()->debug();
+ debug->Load();
+ i::Handle<i::JSObject> js_debug
+ = i::Handle<i::JSObject>(debug->debug_context()->global());
utility_context_->Global()->Set(String::New("$debug"),
- Utils::ToLocal(debug));
+ Utils::ToLocal(js_debug));
#endif
// Run the d8 shell utility script in the utility context
@@ -482,7 +483,7 @@
#ifdef ENABLE_DEBUGGER_SUPPORT
// Set the security token of the debug context to allow access.
-
i::Debug::debug_context()->set_security_token(i::Heap::undefined_value());
+ debug->debug_context()->set_security_token(HEAP->undefined_value());
// Start the debugger agent if requested.
if (i::FLAG_debugger_agent) {
@@ -598,8 +599,8 @@
class ShellThread : public i::Thread {
public:
- ShellThread(int no, i::Vector<const char> files)
- : no_(no), files_(files) { }
+ ShellThread(i::Isolate* isolate, int no, i::Vector<const char> files)
+ : i::Thread(isolate), no_(no), files_(files) { }
virtual void Run();
private:
int no_;
@@ -730,7 +731,8 @@
const char* files = ReadChars(argv[++i], &size);
if (files == NULL) return 1;
ShellThread* thread =
- new ShellThread(threads.length(),
+ new ShellThread(i::Isolate::Current(),
+ threads.length(),
i::Vector<const char>(files, size));
thread->Start();
threads.Add(thread);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev