commit | ccc9d979a5291e62096ac645c4ce9873afc40496 | [log] [tgz] |
---|---|---|
author | Tommi <tommi@webrtc.org> | Thu Mar 24 07:12:36 2022 |
committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Mar 24 08:18:43 2022 |
tree | 9a86c2e407d8b50942151853a92009de321e0b0f | |
parent | b6b34fc213fd2b13f527037e4220df14b680e214 [diff] |
Add checks for a null msg_queue_ to VirtualSocketServer. The Thread class internally (`Thread::DoDestroy`) makes this call: ss_->SetMessageQueue(nullptr); Which sets the `msg_queue_` member variable of VirtualSocketServer to nullptr. VSS checks for this in several places, but not all. In particular `CancelConnects()` does handle it, but Disconnect(), which is called from the same place (VirtualSocket::Close()), is missing this check. This CL adds some DCHECKs to catch when a pointer might be nullptr and also avoids dereferencing a potential nullptr deref during teardown if `Disconnect` is called, e.g. from within `VirtualSocket::Close()` which is called from the dtor of `VirtualSocket`. Bug: webrtc:13864 Change-Id: I717a0f033ebf70b1f59338680957723a77ccf4ca Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256600 Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36312}
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.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.