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

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

Issue 1916223003: Fixes NetworkInterface.list crash on Android (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « runtime/bin/socket_unsupported.cc ('k') | sdk/lib/_internal/js_runtime/lib/io_patch.dart » ('j') | 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(TARGET_OS_WINDOWS) 8 #if defined(TARGET_OS_WINDOWS)
9 9
10 #include "bin/socket.h" 10 #include "bin/socket.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 SetLastError(rc); 404 SetLastError(rc);
405 return -1; 405 return -1;
406 } 406 }
407 407
408 DatagramSocket* datagram_socket = new DatagramSocket(s); 408 DatagramSocket* datagram_socket = new DatagramSocket(s);
409 datagram_socket->EnsureInitialized(EventHandler::delegate()); 409 datagram_socket->EnsureInitialized(EventHandler::delegate());
410 return reinterpret_cast<intptr_t>(datagram_socket); 410 return reinterpret_cast<intptr_t>(datagram_socket);
411 } 411 }
412 412
413 413
414 bool Socket::ListInterfacesSupported() {
415 return true;
416 }
417
418
414 AddressList<InterfaceSocketAddress>* Socket::ListInterfaces( 419 AddressList<InterfaceSocketAddress>* Socket::ListInterfaces(
415 int type, 420 int type,
416 OSError** os_error) { 421 OSError** os_error) {
417 Initialize(); 422 Initialize();
418 423
419 ULONG size = 0; 424 ULONG size = 0;
420 DWORD flags = GAA_FLAG_SKIP_ANYCAST | 425 DWORD flags = GAA_FLAG_SKIP_ANYCAST |
421 GAA_FLAG_SKIP_MULTICAST | 426 GAA_FLAG_SKIP_MULTICAST |
422 GAA_FLAG_SKIP_DNS_SERVER; 427 GAA_FLAG_SKIP_DNS_SERVER;
423 // Query the size needed. 428 // Query the size needed.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 reinterpret_cast<char *>(&mreq), 714 reinterpret_cast<char *>(&mreq),
710 sizeof(mreq)) == 0; 715 sizeof(mreq)) == 0;
711 } 716 }
712 717
713 } // namespace bin 718 } // namespace bin
714 } // namespace dart 719 } // namespace dart
715 720
716 #endif // defined(TARGET_OS_WINDOWS) 721 #endif // defined(TARGET_OS_WINDOWS)
717 722
718 #endif // !defined(DART_IO_DISABLED) 723 #endif // !defined(DART_IO_DISABLED)
OLDNEW
« no previous file with comments | « runtime/bin/socket_unsupported.cc ('k') | sdk/lib/_internal/js_runtime/lib/io_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698