mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 01:25:41 +00:00
Fix perf_test.
Review-Url: https://codereview.chromium.org/2903543002 .
This commit is contained in:
parent
d7a4c35ef4
commit
3aad4a9cd8
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue