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

Unified Diff: runtime/bin/stdio_patch.dart

Issue 13787003: Wrap stdout/stderr/stdin to only expose the relevant methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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: runtime/bin/stdio_patch.dart
diff --git a/runtime/bin/stdio_patch.dart b/runtime/bin/stdio_patch.dart
index 941ae374af38f04c8c28d33354704039156be6bf..c90e557c1648402405ef128ac714534079afe959 100644
--- a/runtime/bin/stdio_patch.dart
+++ b/runtime/bin/stdio_patch.dart
@@ -8,9 +8,9 @@ patch class _StdIOUtils {
case _STDIO_HANDLE_TYPE_TERMINAL:
case _STDIO_HANDLE_TYPE_PIPE:
case _STDIO_HANDLE_TYPE_SOCKET:
- return new _Socket._readPipe(0);
+ return new _Stdin(new _Socket._readPipe(0));
case _STDIO_HANDLE_TYPE_FILE:
- return new _FileStream.forStdin();
+ return new _Stdin(new _FileStream.forStdin());
default:
throw new FileIOException("Unsupported stdin type");
}
@@ -22,9 +22,9 @@ patch class _StdIOUtils {
case _STDIO_HANDLE_TYPE_TERMINAL:
case _STDIO_HANDLE_TYPE_PIPE:
case _STDIO_HANDLE_TYPE_SOCKET:
- return new _Socket._writePipe(fd);
+ return new _StdSink(new _Socket._writePipe(fd));
case _STDIO_HANDLE_TYPE_FILE:
- return new IOSink(new _FileStreamConsumer.fromStdio(fd));
+ return new _StdSink(new IOSink(new _FileStreamConsumer.fromStdio(fd)));
default:
throw new FileIOException("Unsupported stdin type");
}
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | sdk/lib/io/stdio.dart » ('j') | sdk/lib/io/stdio.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698