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

Unified Diff: src/d8-debug.cc

Issue 27330: Unify the handling of the event and response JSON in developer shell debugger... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 10 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 | « src/d8.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8-debug.cc
===================================================================
--- src/d8-debug.cc (revision 1398)
+++ src/d8-debug.cc (working copy)
@@ -57,13 +57,17 @@
}
// Print the event details.
- Handle<String> details =
- Shell::DebugEventToText(Handle<String>::Cast(event_json));
- if (details->Length() == 0) {
+ Handle<Object> details =
+ Shell::DebugMessageDetails(Handle<String>::Cast(event_json));
+ if (try_catch.HasCaught()) {
+ Shell::ReportException(&try_catch);
+ return;
+ }
+ String::Utf8Value str(details->Get(String::New("text")));
+ if (str.length() == 0) {
// Empty string is used to signal not to process this event.
return;
}
- String::Utf8Value str(details);
printf("%s\n", *str);
// Get the debug command processor.
@@ -123,7 +127,7 @@
Handle<String> response = Handle<String>::Cast(response_val);
// Convert the debugger response into text details and the running state.
- Handle<Object> response_details = Shell::DebugResponseDetails(response);
+ Handle<Object> response_details = Shell::DebugMessageDetails(response);
if (try_catch.HasCaught()) {
Shell::ReportException(&try_catch);
continue;
« no previous file with comments | « src/d8.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698