Chromium Code Reviews| Index: runtime/bin/stdio_patch.dart |
| diff --git a/runtime/bin/stdio_patch.dart b/runtime/bin/stdio_patch.dart |
| index 7e66009655ce1c76856d4b56dc08751de6c8cc29..c7e425866459812dd7b833ea9b4becda09c75b0d 100644 |
| --- a/runtime/bin/stdio_patch.dart |
| +++ b/runtime/bin/stdio_patch.dart |
| @@ -29,12 +29,17 @@ patch class _StdIOUtils { |
| } |
| } |
| - static int _socketType(nativeSocket) { |
| - var result = _getSocketType(nativeSocket); |
| - if (result is OSError) { |
| - throw new FileSystemException("Error retrieving socket type", "", result); |
| + static int _socketType(Socket socket) { |
| + if (socket is _Socket) { |
|
Florian Schneider
2016/05/09 09:05:15
Why do the is-test again here?
floitsch
2016/05/09 12:48:01
Where is the other test?
Basically, `nativeSocket
Florian Schneider
2016/05/09 13:39:43
Sorry, missed the _.
|
| + var nativeSocket = socket._nativeSocket; |
| + var result = _getSocketType(nativeSocket); |
| + if (result is OSError) { |
| + throw new FileSystemException( |
| + "Error retrieving socket type", "", result); |
| + } |
| + return result; |
| } |
| - return result; |
| + return null; |
| } |
| static _getStdioHandleType(int fd) native "File_GetStdioHandleType"; |