| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 switch (code) { | 75 switch (code) { |
| 76 case Constants.ISOLATE_STARTUP_MESSAGE_ID: | 76 case Constants.ISOLATE_STARTUP_MESSAGE_ID: |
| 77 runningIsolates.isolateStartup(port_id, sp, name); | 77 runningIsolates.isolateStartup(port_id, sp, name); |
| 78 break; | 78 break; |
| 79 case Constants.ISOLATE_SHUTDOWN_MESSAGE_ID: | 79 case Constants.ISOLATE_SHUTDOWN_MESSAGE_ID: |
| 80 runningIsolates.isolateShutdown(port_id, sp); | 80 runningIsolates.isolateShutdown(port_id, sp); |
| 81 break; | 81 break; |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 | 84 |
| 85 void _eventMessageHandler(int eventType, String eventMessage) { | 85 void _eventMessageHandler(int eventType, dynamic eventMessage) { |
| 86 var subscribers = eventMap[eventType]; | 86 var subscribers = eventMap[eventType]; |
| 87 if (subscribers == null) { | 87 if (subscribers == null) { |
| 88 return; | 88 return; |
| 89 } | 89 } |
| 90 for (var subscriber in subscribers) { | 90 for (var subscriber in subscribers) { |
| 91 subscriber.post(null, eventMessage); | 91 subscriber.post(null, eventMessage); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 void messageHandler(message) { | 95 void messageHandler(message) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 return new VMService().eventPort; | 147 return new VMService().eventPort; |
| 148 } | 148 } |
| 149 | 149 |
| 150 void _registerIsolate(int port_id, SendPort sp, String name) { | 150 void _registerIsolate(int port_id, SendPort sp, String name) { |
| 151 var service = new VMService(); | 151 var service = new VMService(); |
| 152 service.runningIsolates.isolateStartup(port_id, sp, name); | 152 service.runningIsolates.isolateStartup(port_id, sp, name); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void _setEventMask(int mask) | 155 void _setEventMask(int mask) |
| 156 native "VMService_SetEventMask"; | 156 native "VMService_SetEventMask"; |
| OLD | NEW |