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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart2js.dart

Issue 12316036: Merge IO v2 branch to bleeding edge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r18818 Created 7 years, 10 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
Index: sdk/lib/_internal/compiler/implementation/dart2js.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
index 07d8e1fe7d78aa45f0aa3aeecf94dd0d2f349caa..0f0a0294946c47ac519a098bf17d0bd762c0555c 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -290,7 +290,8 @@ void compile(List<String> argv) {
if (uri.scheme != 'file') {
fail('Error: Unhandled scheme ${uri.scheme} in $uri.');
}
- var outputStream = new File(uriPathToNative(uri.path)).openOutputStream();
+ IOSink output =
+ new File(uriPathToNative(uri.path)).openWrite();
CountingSink sink;
@@ -298,16 +299,16 @@ void compile(List<String> argv) {
if (sourceMapFileName != null) {
String sourceMapTag = '//@ sourceMappingURL=$sourceMapFileName\n';
sink.count += sourceMapTag.length;
- outputStream.writeString(sourceMapTag);
+ output.addString(sourceMapTag);
}
- outputStream.close();
+ output.close();
if (isPrimaryOutput) {
charactersWritten += sink.count;
}
}
var controller = new StreamController<String>();
- controller.stream.listen(outputStream.writeString, onDone: onDone);
+ controller.stream.listen(output.addString, onDone: onDone);
sink = new CountingSink(controller);
return sink;
}
« no previous file with comments | « samples/tests/samples/chat/chat_server_test.dart ('k') | sdk/lib/_internal/compiler/implementation/lib/io_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698