| 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 24 matching lines...) Expand all Loading... |
| 35 } | 35 } |
| 36 | 36 |
| 37 void _removeClient(Client client) { | 37 void _removeClient(Client client) { |
| 38 clients.remove(client); | 38 clients.remove(client); |
| 39 } | 39 } |
| 40 | 40 |
| 41 int eventTypeCode(String eventType) { | 41 int eventTypeCode(String eventType) { |
| 42 switch(eventType) { | 42 switch(eventType) { |
| 43 case 'debug': | 43 case 'debug': |
| 44 return Constants.EVENT_FAMILY_DEBUG; | 44 return Constants.EVENT_FAMILY_DEBUG; |
| 45 case 'gc': |
| 46 return Constants.EVENT_FAMILY_GC; |
| 45 default: | 47 default: |
| 46 return -1; | 48 return -1; |
| 47 } | 49 } |
| 48 } | 50 } |
| 49 | 51 |
| 50 void _updateEventMask() { | 52 void _updateEventMask() { |
| 51 int mask = 0; | 53 int mask = 0; |
| 52 for (var key in eventMap.keys) { | 54 for (var key in eventMap.keys) { |
| 53 var subscribers = eventMap[key]; | 55 var subscribers = eventMap[key]; |
| 54 if (subscribers.isNotEmpty) { | 56 if (subscribers.isNotEmpty) { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 return new VMService().eventPort; | 147 return new VMService().eventPort; |
| 146 } | 148 } |
| 147 | 149 |
| 148 void _registerIsolate(int port_id, SendPort sp, String name) { | 150 void _registerIsolate(int port_id, SendPort sp, String name) { |
| 149 var service = new VMService(); | 151 var service = new VMService(); |
| 150 service.runningIsolates.isolateStartup(port_id, sp, name); | 152 service.runningIsolates.isolateStartup(port_id, sp, name); |
| 151 } | 153 } |
| 152 | 154 |
| 153 void _setEventMask(int mask) | 155 void _setEventMask(int mask) |
| 154 native "VMService_SetEventMask"; | 156 native "VMService_SetEventMask"; |
| OLD | NEW |