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

Side by Side Diff: runtime/bin/dbg_message.cc

Issue 59883019: Fix json message in debugger wire protocol (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/platform/json.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "bin/dbg_connection.h" 5 #include "bin/dbg_connection.h"
6 #include "bin/dbg_message.h" 6 #include "bin/dbg_message.h"
7 #include "bin/dartutils.h" 7 #include "bin/dartutils.h"
8 #include "bin/thread.h" 8 #include "bin/thread.h"
9 #include "bin/utils.h" 9 #include "bin/utils.h"
10 10
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 FormatEncodedString(buf, location.script_url); 252 FormatEncodedString(buf, location.script_url);
253 buf->Printf(",\"libraryId\":%d,", location.library_id); 253 buf->Printf(",\"libraryId\":%d,", location.library_id);
254 buf->Printf("\"tokenOffset\":%d}", location.token_pos); 254 buf->Printf("\"tokenOffset\":%d}", location.token_pos);
255 } 255 }
256 print_text_field = false; 256 print_text_field = false;
257 } else { 257 } else {
258 buf->Printf("\"kind\":\"object\""); 258 buf->Printf("\"kind\":\"object\"");
259 intptr_t class_id = 0; 259 intptr_t class_id = 0;
260 Dart_Handle res = Dart_GetObjClassId(object, &class_id); 260 Dart_Handle res = Dart_GetObjClassId(object, &class_id);
261 if (!Dart_IsError(res)) { 261 if (!Dart_IsError(res)) {
262 buf->Printf(",\"classId\":%" Pd ",", class_id); 262 buf->Printf(",\"classId\":%" Pd "", class_id);
263 } 263 }
264 } 264 }
265 if (print_text_field) { 265 if (print_text_field) {
266 buf->Printf(",\"text\":\""); 266 buf->Printf(",\"text\":\"");
267 const intptr_t max_chars = 250; 267 const intptr_t max_chars = 250;
268 FormatTextualValue(buf, object, max_chars, true); 268 FormatTextualValue(buf, object, max_chars, true);
269 buf->Printf("\""); 269 buf->Printf("\"");
270 } 270 }
271 } 271 }
272 272
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 } else { 1324 } else {
1325 ASSERT(kind == kShutdown); 1325 ASSERT(kind == kShutdown);
1326 RemoveIsolateMsgQueue(isolate_id); 1326 RemoveIsolateMsgQueue(isolate_id);
1327 } 1327 }
1328 } 1328 }
1329 Dart_ExitScope(); 1329 Dart_ExitScope();
1330 } 1330 }
1331 1331
1332 } // namespace bin 1332 } // namespace bin
1333 } // namespace dart 1333 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/platform/json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698