commit | ad82a424e4fe00b0b64dd6886f16a5bf68424515 | [log] [tgz] |
---|---|---|
author | Elad Alon <eladalon@webrtc.org> | Mon Dec 03 11:48:16 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Dec 03 12:41:21 2018 |
tree | 099d260bb8143c2ed8a8613ffa9eafd3ed188f4c | |
parent | 4da382e34de4e6ce66c65396fba896c2c15c21e3 [diff] |
Fix race over RtcEventLogImpl::task_queue_ RtcEventLogImpl::task_queue_ is a std::unique_ptr<rtc::TaskQueue>. When a unique_ptr is destroyed, it first sets its internal pointer to point to null, and only then invokes the destructor of that object. However, the code in RtcEventLogImpl relies on rtc::TaskQueue's property, that its destructor blocks on executing tasks. We solve by manually invoking the destructor, and only resetting the internal pointer thereafter. In theory, we could have changed the unique_ptr to a raw pointer at this point. We avoid that, so as to keep the ownership clearer to readers of the code. Bug: webrtc:10085 Change-Id: I54bbf5d6bae019757ca2e31ee960d558058ccc42 Reviewed-on: https://webrtc-review.googlesource.com/c/112598 Commit-Queue: Elad Alon <eladalon@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25875}
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 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.