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

Unified Diff: sdk/lib/io/stdio.dart

Issue 13636003: Fix a number of issues with determining the type of stdio (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments 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
« no previous file with comments | « runtime/bin/stdio_patch.dart ('k') | tests/standalone/io/dart_std_io_pipe_script.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/stdio.dart
diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart
index eb7119c95836348e88cf9e51aa68536d88e9b92c..1ed157e95550943d1e0ae0a7ca7930a0c4292439 100644
--- a/sdk/lib/io/stdio.dart
+++ b/sdk/lib/io/stdio.dart
@@ -8,7 +8,7 @@ const int _STDIO_HANDLE_TYPE_TERMINAL = 0;
const int _STDIO_HANDLE_TYPE_PIPE = 1;
const int _STDIO_HANDLE_TYPE_FILE = 2;
const int _STDIO_HANDLE_TYPE_SOCKET = 3;
-const int _STDIO_HANDLE_TYPE_OTHER = -1;
+const int _STDIO_HANDLE_TYPE_OTHER = 4;
class StdioType {
@@ -16,8 +16,9 @@ class StdioType {
static const StdioType PIPE = const StdioType._("pipe");
static const StdioType FILE = const StdioType._("file");
static const StdioType OTHER = const StdioType._("other");
- const StdioType._(String this.name);
final String name;
+ const StdioType._(String this.name);
+ String toString() => "StdioType: $name";
}
@@ -63,7 +64,7 @@ StdioType stdioType(object) {
}
if (object is IOSink) {
try {
- if (object._sink.target is _FileStreamConsumer) {
+ if (object._target is _FileStreamConsumer) {
return StdioType.FILE;
}
} catch (e) {
« no previous file with comments | « runtime/bin/stdio_patch.dart ('k') | tests/standalone/io/dart_std_io_pipe_script.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698