| OLD | NEW |
| 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" |
| 11 #include "vm/metrics.h" | 11 #include "vm/metrics.h" |
| 12 #include "vm/object.h" | 12 #include "vm/object.h" |
| 13 #include "vm/service.h" | 13 #include "vm/service.h" |
| 14 #include "vm/service_event.h" | 14 #include "vm/service_event.h" |
| 15 #include "vm/timeline.h" | 15 #include "vm/timeline.h" |
| 16 #include "vm/unicode.h" | 16 #include "vm/unicode.h" |
| 17 | 17 |
| 18 | 18 |
| 19 namespace dart { | 19 namespace dart { |
| 20 | 20 |
| 21 #ifndef PRODUCT |
| 22 |
| 21 DECLARE_FLAG(bool, trace_service); | 23 DECLARE_FLAG(bool, trace_service); |
| 22 | 24 |
| 23 JSONStream::JSONStream(intptr_t buf_size) | 25 JSONStream::JSONStream(intptr_t buf_size) |
| 24 : open_objects_(0), | 26 : open_objects_(0), |
| 25 buffer_(buf_size), | 27 buffer_(buf_size), |
| 26 default_id_zone_(), | 28 default_id_zone_(), |
| 27 id_zone_(&default_id_zone_), | 29 id_zone_(&default_id_zone_), |
| 28 reply_port_(ILLEGAL_PORT), | 30 reply_port_(ILLEGAL_PORT), |
| 29 seq_(NULL), | 31 seq_(NULL), |
| 30 method_(""), | 32 method_(""), |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 va_start(args, format); | 852 va_start(args, format); |
| 851 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); | 853 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); |
| 852 va_end(args); | 854 va_end(args); |
| 853 ASSERT(len == len2); | 855 ASSERT(len == len2); |
| 854 stream_->buffer_.AddChar('"'); | 856 stream_->buffer_.AddChar('"'); |
| 855 stream_->AddEscapedUTF8String(p); | 857 stream_->AddEscapedUTF8String(p); |
| 856 stream_->buffer_.AddChar('"'); | 858 stream_->buffer_.AddChar('"'); |
| 857 free(p); | 859 free(p); |
| 858 } | 860 } |
| 859 | 861 |
| 862 #endif // !PRODUCT |
| 863 |
| 860 } // namespace dart | 864 } // namespace dart |
| OLD | NEW |