Index: src/api.cc |
=================================================================== |
--- src/api.cc (revision 636) |
+++ src/api.cc (working copy) |
@@ -2800,8 +2800,8 @@ |
bool Debug::AddDebugEventListener(DebugEventCallback that, Handle<Value> data) { |
- EnsureInitialized("v8::V8::AddDebugEventListener()"); |
- ON_BAILOUT("v8::V8::AddDebugEventListener()", return false); |
+ EnsureInitialized("v8::Debug::AddDebugEventListener()"); |
+ ON_BAILOUT("v8::Debug::AddDebugEventListener()", return false); |
HandleScope scope; |
NeanderArray listeners(i::Factory::debug_event_listeners()); |
NeanderObject obj(2); |
@@ -2817,7 +2817,7 @@ |
bool Debug::AddDebugEventListener(v8::Handle<v8::Function> that, |
Handle<Value> data) { |
- ON_BAILOUT("v8::V8::AddDebugEventListener()", return false); |
+ ON_BAILOUT("v8::Debug::AddDebugEventListener()", return false); |
HandleScope scope; |
NeanderArray listeners(i::Factory::debug_event_listeners()); |
NeanderObject obj(2); |
@@ -2832,8 +2832,8 @@ |
void Debug::RemoveDebugEventListener(DebugEventCallback that) { |
- EnsureInitialized("v8::V8::RemoveDebugEventListener()"); |
- ON_BAILOUT("v8::V8::RemoveDebugEventListener()", return); |
+ EnsureInitialized("v8::Debug::RemoveDebugEventListener()"); |
+ ON_BAILOUT("v8::Debug::RemoveDebugEventListener()", return); |
HandleScope scope; |
NeanderArray listeners(i::Factory::debug_event_listeners()); |
for (int i = 0; i < listeners.length(); i++) { |
@@ -2853,7 +2853,7 @@ |
void Debug::RemoveDebugEventListener(v8::Handle<v8::Function> that) { |
- ON_BAILOUT("v8::V8::RemoveDebugEventListener()", return); |
+ ON_BAILOUT("v8::Debug::RemoveDebugEventListener()", return); |
HandleScope scope; |
NeanderArray listeners(i::Factory::debug_event_listeners()); |
for (int i = 0; i < listeners.length(); i++) { |
@@ -2875,16 +2875,19 @@ |
void Debug::DebugBreak() { |
+ if (!i::V8::HasBeenSetup()) return; |
i::StackGuard::DebugBreak(); |
} |
void Debug::SetMessageHandler(v8::DebugMessageHandler handler, void* data) { |
+ EnsureInitialized("v8::Debug::SetMessageHandler"); |
i::Debugger::SetMessageHandler(handler, data); |
} |
void Debug::SendCommand(const uint16_t* command, int length) { |
+ if (!i::V8::HasBeenSetup()) return; |
Kasper Lund
2008/10/30 10:09:34
Does the command sender expect an answer? If so, t
Søren Thygesen Gjesse
2008/10/30 10:27:02
All command responses are send through a callback
|
i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length)); |
} |