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

Unified Diff: runtime/bin/stdio_patch.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: Add fix for Mac OS as well Created 7 years, 9 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 38c488d1857070345f2796b21336caf916b4c378..941ae374af38f04c8c28d33354704039156be6bf 100644
--- a/runtime/bin/stdio_patch.dart
+++ b/runtime/bin/stdio_patch.dart
@@ -31,7 +31,11 @@ patch class _StdIOUtils {
}
static int _socketType(nativeSocket) {
- return _getSocketType(nativeSocket);
+ var result = _getSocketType(nativeSocket);
+ if (result is OSError) {
+ throw new FileIOException("Error retreiving socket type", result);
+ }
+ return result;
}
}

Powered by Google App Engine
This is Rietveld 408576698