Index: net/udp/udp_socket_posix.cc |
diff --git a/net/udp/udp_socket_posix.cc b/net/udp/udp_socket_posix.cc |
index f869256ca547b912ddd5853cbbdf0949f3e1db85..6b047f5c03c9e5131f347ea636489c72dcc90a29 100644 |
--- a/net/udp/udp_socket_posix.cc |
+++ b/net/udp/udp_socket_posix.cc |
@@ -20,6 +20,7 @@ |
#include "base/metrics/sparse_histogram.h" |
#include "base/posix/eintr_wrapper.h" |
#include "base/rand_util.h" |
+#include "base/threading/thread_restrictions.h" |
#include "base/trace_event/trace_event.h" |
#include "net/base/io_buffer.h" |
#include "net/base/ip_address.h" |
@@ -352,6 +353,10 @@ int UDPSocketPosix::BindToNetwork( |
// space as it shims libc functions like connect(). |
base::FilePath file(base::FilePath::FromUTF16Unsafe( |
base::GetNativeLibraryName(base::ASCIIToUTF16("netd_client")))); |
xunjieli
2016/06/27 18:54:16
If we already have netd_client loaded in Chromium'
pauljensen
2016/06/27 19:07:10
setNetworkForSocket is nullptr when the executable
|
+ // Disable IO assertion in LoadNativeLibrary as the library will already |
+ // be loaded by the socket() call (which goes through libnetd_client) that |
+ // created |socket_|, so no IO will actually be performed. crbug.com/623555 |
+ base::ThreadRestrictions::ScopedAllowIO allow_io; |
base::NativeLibrary lib = base::LoadNativeLibrary(file, nullptr); |
setNetworkForSocket = reinterpret_cast<SetNetworkForSocket>( |
base::GetFunctionPointerFromNativeLibrary(lib, "setNetworkForSocket")); |