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

Unified Diff: runtime/bin/builtin.dart

Issue 8574002: Handle stdin/stdout/stderr on Windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | runtime/bin/builtin_in.cc » ('j') | runtime/bin/eventhandler_win.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.dart
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index 88498e1379ea260ad80816a177984fd3b1f2eb5c..e893e18d23f62ef8413d06ad61f5ba64ed2cddde 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -19,7 +19,7 @@ Socket _stdin;
OutputStream get stdin() {
if (_stdin == null) {
_stdin = new _Socket._internalReadOnly();
- _stdin._id = 0;
+ _getStdioHandle(_stdin, 0);
}
return _stdin.inputStream;
}
@@ -28,7 +28,7 @@ Socket _stdout;
OutputStream get stdout() {
if (_stdout == null) {
_stdout = new _Socket._internalWriteOnly();
- _stdout._id = 1;
+ _getStdioHandle(_stdout, 1);
}
return _stdout.outputStream;
}
@@ -37,13 +37,15 @@ Socket _stderr;
OutputStream get stderr() {
if (_stderr == null) {
_stderr = new _Socket._internalWriteOnly();
- _stderr._id = 2;
+ _getStdioHandle(_stderr, 2);
}
return _stderr.outputStream;
}
_exit(int status) native "Exit";
+_getStdioHandle(Socket socket, int num) native "Socket_GetStdioHandle";
+
class _Logger {
static void _printString(String s) native "Logger_PrintString";
}
« no previous file with comments | « no previous file | runtime/bin/builtin_in.cc » ('j') | runtime/bin/eventhandler_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698