| Index: runtime/bin/vmservice/observatory/lib/service_html.dart
|
| ===================================================================
|
| --- runtime/bin/vmservice/observatory/lib/service_html.dart (revision 39330)
|
| +++ runtime/bin/vmservice/observatory/lib/service_html.dart (working copy)
|
| @@ -7,6 +7,7 @@
|
| import 'dart:async';
|
| import 'dart:convert';
|
| import 'dart:html';
|
| +import 'dart:typed_data';
|
|
|
| import 'package:observatory/service_common.dart';
|
|
|
| @@ -37,6 +38,14 @@
|
| void close() {
|
| _webSocket.close();
|
| }
|
| +
|
| + Future<ByteData> nonStringToByteData(dynamic data) {
|
| + assert(data is Blob);
|
| + FileReader fileReader = new FileReader();
|
| + fileReader.readAsArrayBuffer(data);
|
| + return fileReader.onLoadEnd.first.then((e)
|
| + => new ByteData.view(fileReader.result));
|
| + }
|
| }
|
|
|
| /// The [WebSocketVM] communicates with a Dart VM over WebSocket. The Dart VM
|
|
|