| 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" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 ASSERT(port != ILLEGAL_PORT); | 95 ASSERT(port != ILLEGAL_PORT); |
| 96 set_reply_port(ILLEGAL_PORT); // Prevent double replies. | 96 set_reply_port(ILLEGAL_PORT); // Prevent double replies. |
| 97 int64_t process_delta_micros = 0; | 97 int64_t process_delta_micros = 0; |
| 98 if (FLAG_trace_service) { | 98 if (FLAG_trace_service) { |
| 99 process_delta_micros = OS::GetCurrentTimeMicros() - setup_time_micros_; | 99 process_delta_micros = OS::GetCurrentTimeMicros() - setup_time_micros_; |
| 100 } | 100 } |
| 101 const String& reply = String::Handle(String::New(ToCString())); | 101 const String& reply = String::Handle(String::New(ToCString())); |
| 102 ASSERT(!reply.IsNull()); | 102 ASSERT(!reply.IsNull()); |
| 103 | 103 |
| 104 uint8_t* data = NULL; | 104 uint8_t* data = NULL; |
| 105 MessageWriter writer(&data, &allocator); | 105 MessageWriter writer(&data, &allocator, false); |
| 106 writer.WriteMessage(reply); | 106 writer.WriteMessage(reply); |
| 107 PortMap::PostMessage(new Message(port, data, | 107 PortMap::PostMessage(new Message(port, data, |
| 108 writer.BytesWritten(), | 108 writer.BytesWritten(), |
| 109 Message::kNormalPriority)); | 109 Message::kNormalPriority)); |
| 110 if (FLAG_trace_service) { | 110 if (FLAG_trace_service) { |
| 111 Isolate* isolate = Isolate::Current(); | 111 Isolate* isolate = Isolate::Current(); |
| 112 ASSERT(isolate != NULL); | 112 ASSERT(isolate != NULL); |
| 113 const char* isolate_name = isolate->name(); | 113 const char* isolate_name = isolate->name(); |
| 114 OS::Print("Isolate %s processed service request /%s", | 114 OS::Print("Isolate %s processed service request /%s", |
| 115 isolate_name, command_); | 115 isolate_name, command_); |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); | 507 intptr_t len2 = OS::VSNPrint(p, len+1, format, args); |
| 508 va_end(args); | 508 va_end(args); |
| 509 ASSERT(len == len2); | 509 ASSERT(len == len2); |
| 510 stream_->buffer_.AddChar('"'); | 510 stream_->buffer_.AddChar('"'); |
| 511 stream_->AddEscapedUTF8String(p); | 511 stream_->AddEscapedUTF8String(p); |
| 512 stream_->buffer_.AddChar('"'); | 512 stream_->buffer_.AddChar('"'); |
| 513 free(p); | 513 free(p); |
| 514 } | 514 } |
| 515 | 515 |
| 516 } // namespace dart | 516 } // namespace dart |
| OLD | NEW |