Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 667aa60b7ef0051d1ebb77913693e84e9233bd7e..af9e3fd4c985e90043d5b5755369a636817b596a 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -4903,10 +4903,17 @@ void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) { |
void Debug::SendCommand(const uint16_t* command, int length, |
- ClientData* client_data) { |
- if (!i::Isolate::Current()->IsInitialized()) return; |
- i::Isolate::Current()->debugger()->ProcessCommand( |
- i::Vector<const uint16_t>(command, length), client_data); |
+ ClientData* client_data, |
+ Isolate* isolate) { |
+ // If no isolate is supplied, use the default isolate. |
+ if (isolate != NULL) { |
+ i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
Vitaly Repeshko
2011/03/22 15:54:10
Replace tabs with spaces and fix indentation.
|
+ internal_isolate->debugger()->ProcessCommand( |
+ i::Vector<const uint16_t>(command, length), client_data); |
+ } else { |
+ i::Isolate::GetDefaultIsolateDebugger()->ProcessCommand( |
+ i::Vector<const uint16_t>(command, length), client_data); |
+ } |
} |