OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/message_handler.h" | 5 #include "vm/message_handler.h" |
6 #include "vm/port.h" | 6 #include "vm/port.h" |
7 #include "vm/dart.h" | 7 #include "vm/dart.h" |
8 | 8 |
9 namespace dart { | 9 namespace dart { |
10 | 10 |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 // The handler may have been deleted after this point. | 244 // The handler may have been deleted after this point. |
245 } | 245 } |
246 } | 246 } |
247 | 247 |
248 | 248 |
249 void MessageHandler::ClosePort(Dart_Port port) { | 249 void MessageHandler::ClosePort(Dart_Port port) { |
250 MonitorLocker ml(&monitor_); | 250 MonitorLocker ml(&monitor_); |
251 if (FLAG_trace_isolates) { | 251 if (FLAG_trace_isolates) { |
252 OS::Print("[-] Closing port:\n" | 252 OS::Print("[-] Closing port:\n" |
253 "\thandler: %s\n" | 253 "\thandler: %s\n" |
254 "\tport: %" Pd64 "\n" | 254 "\tport: %" Pd64 "\n", |
255 "\tports: control(%" Pd ") live(%" Pd ")\n", | 255 name(), port); |
256 name(), port, control_ports_, live_ports_); | |
257 } | 256 } |
258 } | 257 } |
259 | 258 |
260 | 259 |
261 void MessageHandler::CloseAllPorts() { | 260 void MessageHandler::CloseAllPorts() { |
262 MonitorLocker ml(&monitor_); | 261 MonitorLocker ml(&monitor_); |
263 if (FLAG_trace_isolates) { | 262 if (FLAG_trace_isolates) { |
264 OS::Print("[-] Closing all ports:\n" | 263 OS::Print("[-] Closing all ports:\n" |
265 "\thandler: %s\n", | 264 "\thandler: %s\n", |
266 name()); | 265 name()); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 298 |
300 void MessageHandler::decrement_control_ports() { | 299 void MessageHandler::decrement_control_ports() { |
301 MonitorLocker ml(&monitor_); | 300 MonitorLocker ml(&monitor_); |
302 #if defined(DEBUG) | 301 #if defined(DEBUG) |
303 CheckAccess(); | 302 CheckAccess(); |
304 #endif | 303 #endif |
305 control_ports_--; | 304 control_ports_--; |
306 } | 305 } |
307 | 306 |
308 } // namespace dart | 307 } // namespace dart |
OLD | NEW |