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

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

Issue 257053003: Always use the same json for null in the vm service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 years, 7 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/isolate.cc ('k') | runtime/vm/json_test.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) 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 6
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/debugger.h" 8 #include "vm/debugger.h"
9 #include "vm/json_stream.h" 9 #include "vm/json_stream.h"
10 #include "vm/message.h" 10 #include "vm/message.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 ASSERT(len == len2); 230 ASSERT(len == len2);
231 buffer_.AddChar('"'); 231 buffer_.AddChar('"');
232 AddEscapedUTF8String(p); 232 AddEscapedUTF8String(p);
233 buffer_.AddChar('"'); 233 buffer_.AddChar('"');
234 free(p); 234 free(p);
235 } 235 }
236 236
237 237
238 void JSONStream::PrintValue(const Object& o, bool ref) { 238 void JSONStream::PrintValue(const Object& o, bool ref) {
239 PrintCommaIfNeeded(); 239 PrintCommaIfNeeded();
240 o.PrintToJSONStream(this, ref); 240 o.PrintJSON(this, ref);
241 } 241 }
242 242
243 243
244 void JSONStream::PrintValue(SourceBreakpoint* bpt) { 244 void JSONStream::PrintValue(SourceBreakpoint* bpt) {
245 PrintCommaIfNeeded(); 245 PrintCommaIfNeeded();
246 bpt->PrintToJSONStream(this); 246 bpt->PrintJSON(this);
247 } 247 }
248 248
249 249
250 void JSONStream::PrintValue(Isolate* isolate, bool ref) { 250 void JSONStream::PrintValue(Isolate* isolate, bool ref) {
251 PrintCommaIfNeeded(); 251 PrintCommaIfNeeded();
252 isolate->PrintToJSONStream(this, ref); 252 isolate->PrintJSON(this, ref);
253 } 253 }
254 254
255 255
256 void JSONStream::PrintPropertyBool(const char* name, bool b) { 256 void JSONStream::PrintPropertyBool(const char* name, bool b) {
257 PrintPropertyName(name); 257 PrintPropertyName(name);
258 PrintValueBool(b); 258 PrintValueBool(b);
259 } 259 }
260 260
261 261
262 void JSONStream::PrintProperty(const char* name, intptr_t i) { 262 void JSONStream::PrintProperty(const char* name, intptr_t i) {
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); 411 intptr_t len2 = OS::VSNPrint(p, len+1, format, args);
412 va_end(args); 412 va_end(args);
413 ASSERT(len == len2); 413 ASSERT(len == len2);
414 stream_->buffer_.AddChar('"'); 414 stream_->buffer_.AddChar('"');
415 stream_->AddEscapedUTF8String(p); 415 stream_->AddEscapedUTF8String(p);
416 stream_->buffer_.AddChar('"'); 416 stream_->buffer_.AddChar('"');
417 free(p); 417 free(p);
418 } 418 }
419 419
420 } // namespace dart 420 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/json_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698