webrtc/logging
Elad Alon ad82a424e4 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}
2018-12-03 12:41:21 +00:00
..
rtc_event_log Fix race over RtcEventLogImpl::task_queue_ 2018-12-03 12:41:21 +00:00
BUILD.gn Log DTLS writable changes to RtcEventLog 2018-12-01 01:00:28 +00:00
OWNERS Removing skvlad@ from logging/OWNERS. 2018-02-02 13:03:29 +00:00