Chromium Code Reviews| Index: runtime/bin/vmservice/observatory/lib/src/service/object.dart |
| =================================================================== |
| --- runtime/bin/vmservice/observatory/lib/src/service/object.dart (revision 39217) |
| +++ runtime/bin/vmservice/observatory/lib/src/service/object.dart (working copy) |
| @@ -253,10 +253,14 @@ |
| final StreamController<ServiceEvent> events = |
| new StreamController.broadcast(); |
| - void postEventMessage(String eventMessage) { |
| + void postEventMessage(dynamic eventMessage, [dynamic data]) { |
|
Cutch
2014/08/15 21:33:58
Is eventMessage actually dynamic now?
koda
2014/08/15 22:20:53
Already fixed in the later patch set.
|
| var map; |
| try { |
| map = _parseJSON(eventMessage); |
| + if (data != null) { |
| + assert(!map.containsKey('_data')); |
| + map['_data'] = data; |
| + } |
| } catch (e, st) { |
| Logger.root.severe('Ignoring malformed event message: ${eventMessage}'); |
| return; |
| @@ -1167,6 +1171,7 @@ |
| @observable String eventType; |
| @observable ServiceMap breakpoint; |
| @observable ServiceMap exception; |
| + @observable ByteData data; |
| void _update(ObservableMap map, bool mapIsRef) { |
| _loaded = true; |
| @@ -1180,7 +1185,15 @@ |
| if (map['exception'] != null) { |
| exception = map['exception']; |
| } |
| + if (map['_data'] != null) { |
| + data = map['_data']; |
| + } |
| } |
| + |
| + String toString() { |
| + return 'ServiceEvent of type $eventType with ' |
| + '${data == null ? 0 : data.lengthInBytes} bytes of binary data'; |
| + } |
| } |
| class Library extends ServiceObject with Coverage { |