Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: pkg/compiler/tool/perf.dart

Issue 2903543002: Fix perf_test. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698