Fix use-after-free in ScreenCast and Camera portal D-Bus callbacks GDBus async callbacks fire on the GLib main thread with a raw pointer to the portal object. When the portal is destroyed on another thread, the callback accesses freed memory. Introduce PortalGuard, a ref-counted mutex-protected wrapper that outlives the portal. Callbacks lock the guard and check the portal pointer before use. Stop() locks the same mutex to null the pointer, blocking until any in-flight callback finishes. Utility functions now take scoped_refptr<PortalGuard> and manage refs internally. Bug: chromium:491979284 Bug: chromium:499587071 Change-Id: I80fe20c5c3b6509666554c7cc7454f09cab6c2e4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/463800 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Jan Grulich <grulja@gmail.com> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Andreas Pehrson <apehrson@mozilla.com> Cr-Commit-Position: refs/heads/main@{#47444}
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.