Index: pkg/compiler/tool/perf.dart |
diff --git a/pkg/compiler/tool/perf.dart b/pkg/compiler/tool/perf.dart |
index ed6763b8e30c431fcd182e2d826d8e55c44352e9..044df8d7cb1069a1a590c2f3805cde3a5f08956d 100644 |
--- a/pkg/compiler/tool/perf.dart |
+++ b/pkg/compiler/tool/perf.dart |
@@ -294,13 +294,7 @@ class _Loader { |
} |
Future<SourceFile> _readFile(Uri uri) async { |
- var data = await inputProvider.readFromUri(uri); |
- if (data is List<int>) return new Utf8BytesSourceFile(uri, data); |
- if (data is String) return new StringSourceFile.fromUri(uri, data); |
- // TODO(sigmund): properly handle errors, just report, return null, wrap |
- // above and continue... |
- throw "Expected a 'String' or a 'List<int>' from the input " |
- "provider, but got: ${data.runtimeType}."; |
+ return await inputProvider.readFromUri(uri, inputKind: InputKind.utf8); |
} |
Uri _translateUri(Uri uri) { |