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

Unified Diff: runtime/bin/socket_patch.dart

Issue 1760033003: Fix Mac OS check for terminal input (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 09904b433de13c0144bcca0949fc509ab205b187..1ec51b77795faff13c3a030cd6c553d4ed713ba3 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -1243,9 +1243,11 @@ class _RawSocket extends Stream<RawSocketEvent>
native.isClosedWrite = true;
if (fd != null) _getStdioHandle(native, fd);
var result = new _RawSocket(native);
- result._isMacOSTerminalInput =
- Platform.isMacOS &&
- _StdIOUtils._socketType(result._socket) == _STDIO_HANDLE_TYPE_TERMINAL;
+ if (fd != null) {
+ var socketType = _StdIOUtils._socketType(result._socket);
+ result._isMacOSTerminalInput =
+ Platform.isMacOS && socketType == _STDIO_HANDLE_TYPE_TERMINAL;
+ }
return result;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698