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

Unified Diff: runtime/bin/socket.cc

Issue 8574002: Handle stdin/stdout/stderr on Windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments from ager@ Created 9 years, 1 month 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/socket.h ('k') | runtime/bin/socket_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket.cc
diff --git a/runtime/bin/socket.cc b/runtime/bin/socket.cc
index c1fc2cb798c0c46ba55021053c32eb08fd3d1413..01793a17040460cfc8fcf3fe962f5d6f2d4eb142 100644
--- a/runtime/bin/socket.cc
+++ b/runtime/bin/socket.cc
@@ -113,6 +113,20 @@ void FUNCTION_NAME(Socket_GetPort)(Dart_NativeArguments args) {
}
+void FUNCTION_NAME(Socket_GetStdioHandle)(Dart_NativeArguments args) {
+ Dart_EnterScope();
+ Dart_Handle socketobj = Dart_GetNativeArgument(args, 0);
+ intptr_t num =
+ DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 1));
+ ASSERT(num == 0 || num == 1 || num == 2);
+ intptr_t socket = Socket::GetStdioHandle(num);
+ DartUtils::SetIntegerInstanceField(
+ socketobj, DartUtils::kIdFieldName, socket);
+ Dart_SetReturnValue(args, Dart_NewBoolean(socket >= 0));
+ Dart_ExitScope();
+}
+
+
void FUNCTION_NAME(ServerSocket_CreateBindListen)(Dart_NativeArguments args) {
Dart_EnterScope();
Dart_Handle socketobj = Dart_GetNativeArgument(args, 0);
« no previous file with comments | « runtime/bin/socket.h ('k') | runtime/bin/socket_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698