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

Side by Side Diff: runtime/bin/socket_base_win.cc

Issue 2797323002: Fixed incorrect call to get a StdHandle in socket_base_win.cc caused by a bad rebase. (Closed)
Patch Set: Fixed incorrect call to get a StdHandle in socket_base_win.cc caused by a bad rebase. Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #if !defined(DART_IO_DISABLED) 5 #if !defined(DART_IO_DISABLED)
6 6
7 #include "platform/globals.h" 7 #include "platform/globals.h"
8 #if defined(HOST_OS_WINDOWS) 8 #if defined(HOST_OS_WINDOWS)
9 9
10 #include "bin/socket_base.h" 10 #include "bin/socket_base.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 168
169 intptr_t SocketBase::GetStdioHandle(intptr_t num) { 169 intptr_t SocketBase::GetStdioHandle(intptr_t num) {
170 if (num != 0) { 170 if (num != 0) {
171 return -1; 171 return -1;
172 } 172 }
173 HANDLE handle = GetStdHandle(STD_INPUT_HANDLE); 173 HANDLE handle = GetStdHandle(STD_INPUT_HANDLE);
174 if (handle == INVALID_HANDLE_VALUE) { 174 if (handle == INVALID_HANDLE_VALUE) {
175 return -1; 175 return -1;
176 } 176 }
177 StdHandle* std_handle = new StdHandle(handle); 177 StdHandle* std_handle = StdHandle::Stdin(handle);
178 std_handle->Retain();
178 std_handle->MarkDoesNotSupportOverlappedIO(); 179 std_handle->MarkDoesNotSupportOverlappedIO();
179 std_handle->EnsureInitialized(EventHandler::delegate()); 180 std_handle->EnsureInitialized(EventHandler::delegate());
180 return reinterpret_cast<intptr_t>(std_handle); 181 return reinterpret_cast<intptr_t>(std_handle);
181 } 182 }
182 183
183 184
184 AddressList<SocketAddress>* SocketBase::LookupAddress(const char* host, 185 AddressList<SocketAddress>* SocketBase::LookupAddress(const char* host,
185 int type, 186 int type,
186 OSError** os_error) { 187 OSError** os_error) {
187 Initialize(); 188 Initialize();
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 return setsockopt(handle->socket(), proto, MCAST_LEAVE_GROUP, 446 return setsockopt(handle->socket(), proto, MCAST_LEAVE_GROUP,
446 reinterpret_cast<char*>(&mreq), sizeof(mreq)) == 0; 447 reinterpret_cast<char*>(&mreq), sizeof(mreq)) == 0;
447 } 448 }
448 449
449 } // namespace bin 450 } // namespace bin
450 } // namespace dart 451 } // namespace dart
451 452
452 #endif // defined(HOST_OS_WINDOWS) 453 #endif // defined(HOST_OS_WINDOWS)
453 454
454 #endif // !defined(DART_IO_DISABLED) 455 #endif // !defined(DART_IO_DISABLED)
OLDNEW
« 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