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

Side by Side Diff: runtime/vm/json_stream.cc

Issue 164183003: Add expandable instances and lists to the vm service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/object.h » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/debugger.h" 7 #include "vm/debugger.h"
8 #include "vm/json_stream.h" 8 #include "vm/json_stream.h"
9 9
10 10
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 free(p); 120 free(p);
121 } 121 }
122 122
123 123
124 void JSONStream::PrintValue(const Object& o, bool ref) { 124 void JSONStream::PrintValue(const Object& o, bool ref) {
125 PrintCommaIfNeeded(); 125 PrintCommaIfNeeded();
126 o.PrintToJSONStream(this, ref); 126 o.PrintToJSONStream(this, ref);
127 } 127 }
128 128
129 129
130 void JSONStream::PrintValue(const Field& field,
131 const Instance& instance,
132 bool ref) {
133 PrintCommaIfNeeded();
134 field.PrintToJSONStreamWithInstance(this, instance, ref);
135 }
136
137
138 void JSONStream::PrintValue(SourceBreakpoint* bpt) { 130 void JSONStream::PrintValue(SourceBreakpoint* bpt) {
139 PrintCommaIfNeeded(); 131 PrintCommaIfNeeded();
140 bpt->PrintToJSONStream(this); 132 bpt->PrintToJSONStream(this);
141 } 133 }
142 134
143 135
144 void JSONStream::PrintPropertyBool(const char* name, bool b) { 136 void JSONStream::PrintPropertyBool(const char* name, bool b) {
145 PrintPropertyName(name); 137 PrintPropertyName(name);
146 PrintValueBool(b); 138 PrintValueBool(b);
147 } 139 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); 264 intptr_t len2 = OS::VSNPrint(p, len+1, format, args);
273 va_end(args); 265 va_end(args);
274 ASSERT(len == len2); 266 ASSERT(len == len2);
275 stream_->buffer_.AddChar('"'); 267 stream_->buffer_.AddChar('"');
276 stream_->buffer_.AddEscapedString(p); 268 stream_->buffer_.AddEscapedString(p);
277 stream_->buffer_.AddChar('"'); 269 stream_->buffer_.AddChar('"');
278 free(p); 270 free(p);
279 } 271 }
280 272
281 } // namespace dart 273 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698