| 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 library vmservice; | 5 library vmservice; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:isolate'; | 9 import 'dart:isolate'; |
| 10 import 'dart:typed_data'; | 10 import 'dart:typed_data'; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 break; | 99 break; |
| 100 case Constants.ISOLATE_SHUTDOWN_MESSAGE_ID: | 100 case Constants.ISOLATE_SHUTDOWN_MESSAGE_ID: |
| 101 runningIsolates.isolateShutdown(portId, sp); | 101 runningIsolates.isolateShutdown(portId, sp); |
| 102 break; | 102 break; |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 void _exit() { | 106 void _exit() { |
| 107 isolateLifecyclePort.close(); | 107 isolateLifecyclePort.close(); |
| 108 scriptLoadPort.close(); | 108 scriptLoadPort.close(); |
| 109 // Create a copy of the set as a list because client.close() alters the set. | 109 // Create a copy of the set as a list because client.disconnect() will |
| 110 // alter the connected clients set. |
| 110 var clientsList = clients.toList(); | 111 var clientsList = clients.toList(); |
| 111 for (var client in clientsList) { | 112 for (var client in clientsList) { |
| 112 client.close(); | 113 client.disconnect(); |
| 113 } | 114 } |
| 114 // Call embedder shutdown hook after the internal shutdown. | 115 // Call embedder shutdown hook after the internal shutdown. |
| 115 if (onShutdown != null) { | 116 if (onShutdown != null) { |
| 116 onShutdown(); | 117 onShutdown(); |
| 117 } | 118 } |
| 118 _onExit(); | 119 _onExit(); |
| 119 } | 120 } |
| 120 | 121 |
| 121 void messageHandler(message) { | 122 void messageHandler(message) { |
| 122 if (message is List) { | 123 if (message is List) { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 service.runningIsolates.isolateStartup(port_id, sp, name); | 321 service.runningIsolates.isolateStartup(port_id, sp, name); |
| 321 } | 322 } |
| 322 | 323 |
| 323 void _onStart() native "VMService_OnStart"; | 324 void _onStart() native "VMService_OnStart"; |
| 324 | 325 |
| 325 void _onExit() native "VMService_OnExit"; | 326 void _onExit() native "VMService_OnExit"; |
| 326 | 327 |
| 327 bool _vmListenStream(String streamId) native "VMService_ListenStream"; | 328 bool _vmListenStream(String streamId) native "VMService_ListenStream"; |
| 328 | 329 |
| 329 void _vmCancelStream(String streamId) native "VMService_CancelStream"; | 330 void _vmCancelStream(String streamId) native "VMService_CancelStream"; |
| OLD | NEW |