Remove rtc::EnsureWinsockInit and g_winsockinit.
In the effort of enabling -Wglobal-constructors and -Wexit-time-destructors, WebRTC has to remove the Winsock global initializer. This will also remove it from Chromium (since it was unused). After this CL, applications will have to explicitly initialize Winsock before using WebRTC, this can be done by using the class rtc::WinsockInitializer provided in rtc_base/win32socketinit.h. Bug: webrtc:9693, webrtc:9754 Change-Id: I4aae12ff43671ef2713a6fc4592e20759dc6b495 Reviewed-on: https://webrtc-review.googlesource.com/99660 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24903}
This commit is contained in:

committed by
Commit Bot

parent
49753428ff
commit
ba5eaee9a2
@ -21,7 +21,7 @@ int PASCAL wWinMain(HINSTANCE instance,
|
||||
HINSTANCE prev_instance,
|
||||
wchar_t* cmd_line,
|
||||
int cmd_show) {
|
||||
rtc::EnsureWinsockInit();
|
||||
rtc::WinsockInitializer winsock_init;
|
||||
rtc::Win32SocketServer w32_ss;
|
||||
rtc::Win32Thread w32_thread(&w32_ss);
|
||||
rtc::ThreadManager::Instance()->SetCurrentThread(&w32_thread);
|
||||
|
Reference in New Issue
Block a user