| Index: runtime/bin/vmservice/observatory/lib/service_io.dart
|
| ===================================================================
|
| --- runtime/bin/vmservice/observatory/lib/service_io.dart (revision 39216)
|
| +++ runtime/bin/vmservice/observatory/lib/service_io.dart (working copy)
|
| @@ -4,7 +4,9 @@
|
|
|
| library service_io;
|
|
|
| +import 'dart:async';
|
| import 'dart:io';
|
| +import 'dart:typed_data';
|
|
|
| import 'package:observatory/service_common.dart';
|
|
|
| @@ -40,6 +42,12 @@
|
| void close() {
|
| _webSocket.close();
|
| }
|
| +
|
| + Future<ByteData> nonStringToByteData(dynamic data) {
|
| + assert(data is Uint8List);
|
| + return new Future.sync(() =>
|
| + new ByteData.view(data.buffer, data.offsetInBytes));
|
| + }
|
| }
|
|
|
| /// The [WebSocketVM] communicates with a Dart VM over WebSocket. The Dart VM
|
|
|