Detach thread checker in RtcEventLogImpl destructor.
Otherwise we require that the destructor must run on the same thread as previous calls. This is not necessary since we can assume there's no other references to the instance when we enter the destructor. Bug: webrtc:9883 Change-Id: Ia254bce9265979da0e25ba33598edd8f807d7e00 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159704 Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29793}
This commit is contained in:
parent
048b10a9ec
commit
60bd1aea3d
@ -68,8 +68,10 @@ RtcEventLogImpl::RtcEventLogImpl(RtcEventLog::EncodingType encoding_type,
|
||||
|
||||
RtcEventLogImpl::~RtcEventLogImpl() {
|
||||
// If we're logging to the output, this will stop that. Blocking function.
|
||||
if (logging_state_started_)
|
||||
if (logging_state_started_) {
|
||||
logging_state_checker_.Detach();
|
||||
StopLogging();
|
||||
}
|
||||
|
||||
// We want to block on any executing task by invoking ~TaskQueue() before
|
||||
// we set unique_ptr's internal pointer to null.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user