Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Unified Diff: src/api.cc

Issue 6715029: Fix crash in Debug::SendCommand. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8-debug.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ }
}
« no previous file with comments | « include/v8-debug.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698