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

Unified Diff: runtime/bin/dbg_message.cc

Issue 14201004: Debugger wire protocol changes (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dbg_message.cc
===================================================================
--- runtime/bin/dbg_message.cc (revision 21684)
+++ runtime/bin/dbg_message.cc (working copy)
@@ -210,8 +210,8 @@
static void FormatValue(dart::TextBuffer* buf, Dart_Handle object) {
- if (Dart_IsInteger(object)) {
- buf->Printf("\"kind\":\"integer\",");
+ if (Dart_IsNumber(object)) {
+ buf->Printf("\"kind\":\"number\",");
} else if (Dart_IsString(object)) {
buf->Printf("\"kind\":\"string\",");
} else if (Dart_IsBoolean(object)) {
@@ -223,6 +223,11 @@
buf->Printf("\"kind\":\"list\",\"length\":%"Pd",", len);
} else {
buf->Printf("\"kind\":\"object\",");
+ intptr_t class_id = 0;
+ Dart_Handle res = Dart_GetObjClassId(object, &class_id);
+ if (!Dart_IsError(res)) {
+ buf->Printf("\"classId\":%"Pd",", class_id);
+ }
}
buf->Printf("\"text\":\"");
const intptr_t max_chars = 250;
@@ -1163,12 +1168,6 @@
msg.Printf("{ \"event\": \"breakpointResolved\", \"params\": {");
msg.Printf("\"breakpointId\": %"Pd"", bp_id);
- // TODO(hausner): remove url and line elements.
- msg.Printf(", \"url\":");
- FormatEncodedString(&msg, location.script_url);
- int line_number = GetIntValue(Dart_GetBreakpointLine(bp_id));
- msg.Printf(",\"line\":%d", line_number);
-
msg.Printf(", \"isolateId\":%"Pd64"", isolate_id);
ASSERT(!Dart_IsNull(location.script_url));
ASSERT(Dart_IsString(location.script_url));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698