Chromium Code Reviews| Index: sdk/lib/io/stdio.dart |
| diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart |
| index 5c1fa8f734fa04146c3194a2744b3a468a0e7e67..44cb06891597380bed01b24dc46cfd011f27c6a6 100644 |
| --- a/sdk/lib/io/stdio.dart |
| +++ b/sdk/lib/io/stdio.dart |
| @@ -273,8 +273,12 @@ IOSink get stderr { |
| StdioType stdioType(object) { |
| if (object is _StdStream) { |
| object = object._stream; |
| - } else if (object is _StdSink) { |
| - object = object._sink; |
| + } else if (object == stdout || object == stderr) { |
| + switch (_getStdioHandleType(object == stdout ? 1 : 2)) { |
|
Søren Gjesse
2014/02/07 11:05:11
Use the STDOUT_FILENO and STDERR_FILENO constants
Anders Johnsen
2014/02/14 08:43:28
They are not available in Dart.
|
| + case _STDIO_HANDLE_TYPE_TERMINAL: return StdioType.TERMINAL; |
| + case _STDIO_HANDLE_TYPE_PIPE: return StdioType.PIPE; |
| + case _STDIO_HANDLE_TYPE_FILE: return StdioType.FILE; |
| + } |
| } |
| if (object is _FileStream) { |
| return StdioType.FILE; |