OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 "vm/bootstrap_natives.h" | 5 #include "vm/bootstrap_natives.h" |
6 #include "vm/dart_api_impl.h" | 6 #include "vm/dart_api_impl.h" |
7 #include "vm/datastream.h" | 7 #include "vm/datastream.h" |
8 #include "vm/exceptions.h" | 8 #include "vm/exceptions.h" |
9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
11 #include "vm/message.h" | 11 #include "vm/message.h" |
| 12 #include "vm/message_handler.h" |
12 #include "vm/native_entry.h" | 13 #include "vm/native_entry.h" |
13 #include "vm/object.h" | 14 #include "vm/object.h" |
14 #include "vm/port.h" | 15 #include "vm/port.h" |
15 #include "vm/service_isolate.h" | 16 #include "vm/service_isolate.h" |
16 #include "vm/symbols.h" | 17 #include "vm/symbols.h" |
17 | 18 |
18 namespace dart { | 19 namespace dart { |
19 | 20 |
20 DECLARE_FLAG(bool, trace_service); | 21 DECLARE_FLAG(bool, trace_service); |
21 | 22 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 } | 133 } |
133 Isolate::VisitIsolates(®ister_isolates); | 134 Isolate::VisitIsolates(®ister_isolates); |
134 #endif | 135 #endif |
135 return Object::null(); | 136 return Object::null(); |
136 } | 137 } |
137 | 138 |
138 | 139 |
139 DEFINE_NATIVE_ENTRY(VMService_OnExit, 0) { | 140 DEFINE_NATIVE_ENTRY(VMService_OnExit, 0) { |
140 if (FLAG_trace_service) { | 141 if (FLAG_trace_service) { |
141 OS::Print("vm-service: processed exit message.\n"); | 142 OS::Print("vm-service: processed exit message.\n"); |
| 143 MessageHandler* message_handler = isolate->message_handler(); |
| 144 OS::Print("vm-service: live ports = %" Pd "\n", |
| 145 message_handler->live_ports()); |
142 } | 146 } |
143 return Object::null(); | 147 return Object::null(); |
144 } | 148 } |
145 | 149 |
146 | 150 |
147 DEFINE_NATIVE_ENTRY(VMService_OnServerAddressChange, 1) { | 151 DEFINE_NATIVE_ENTRY(VMService_OnServerAddressChange, 1) { |
148 if (!FLAG_support_service) { | 152 if (!FLAG_support_service) { |
149 return Object::null(); | 153 return Object::null(); |
150 } | 154 } |
151 GET_NATIVE_ARGUMENT(String, address, arguments->NativeArgAt(0)); | 155 GET_NATIVE_ARGUMENT(String, address, arguments->NativeArgAt(0)); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 idx += 2; | 435 idx += 2; |
432 } | 436 } |
433 | 437 |
434 return result_list.raw(); | 438 return result_list.raw(); |
435 #else | 439 #else |
436 return Object::null(); | 440 return Object::null(); |
437 #endif | 441 #endif |
438 } | 442 } |
439 | 443 |
440 } // namespace dart | 444 } // namespace dart |
OLD | NEW |