a764999e3f4b7c386a3dfa4310f599670cdbbf00

The RWLockWin::Create() function returns NULL on some Windows platforms because it cannot load kernel32.dll. This causes a crash. RWLockWin tries to load kernel32.dll to check if the Slim Reader/Writer Lock APIs are present in kernel32.dll but on newer Windows platforms, kernel32.dll does not exist and the APIs are exported by kernelbase.dll instead. The fix is quite simple: There is no need to try to load any DLL to check if the Slim Reader/Writer Lock APIs are present, because these APIs are always present in all Windows versions since Windows Vista. I am removing the code that attempts to load kernel32.dll. This prevents the crash on platforms that use kernelbase.dll. If the WINUWP preprocessor symbol is defined, RWLockWin was already doing the right thing. But this issue is not limited to WINUWP and in some scenarios, building for WINUWP is not the right solution because it causes other problems. So, my fix is essentially to use the WINUWP code path for all Windows builds. The only version of Windows which does not have the Slim Reader/Writer Lock APIs is Windows XP (and older ones, of course.) However, since the current code does not fall back to an alternative implementation when the Slim Reader/Writer Lock APIs are missing, WebRTC is already broken on such old versions of Windows. Bug: webrtc:11186 Change-Id: I34aad066e18b924792d47c244ecee00669e86c4d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161472 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30044}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
Development
See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.
More info
- Official web site: http://www.webrtc.org
- Master source code repo: https://webrtc.googlesource.com/src
- Samples and reference apps: https://github.com/webrtc
- Mailing list: http://groups.google.com/group/discuss-webrtc
- Continuous build: http://build.chromium.org/p/client.webrtc
- Coding style guide
- Code of conduct
Description
Languages
C++
88.6%
C
3.3%
Java
3%
Objective-C++
1.9%
Python
1.9%
Other
1%