Commit c9e0cff4 authored by Yuri Wiitala's avatar Yuri Wiitala Committed by Commit Bot

Speculative crash-fix for SnooperNode::Render().

The current theory (see bug) is that somehow the member set between
audio::LoopbackStream and media::LoopbackGroupCoordinator became out-of-
sync. This change tests that theory by modifying the destructor to
ensure the exact set of SnooperNode instances that could be in-use by
LoopbackStream::FlowNetwork are cleanly "disconnected" before shutdown
(with further object destruction) proceeds.

Bug: 888478, 867886
Change-Id: I7b34fe168a80302c43a4333b9a181342f7b79912
Reviewed-on: https://chromium-review.googlesource.com/c/1266875
Commit-Queue: Max Morin <maxmorin@chromium.org>
Reviewed-by: default avatarMax Morin <maxmorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597573}
parent 9e347c6f
......@@ -108,9 +108,8 @@ LoopbackStream::~LoopbackStream() {
if (network_) {
if (network_->is_started()) {
coordinator_->RemoveObserver(group_id_, this);
for (LoopbackGroupMember* member :
coordinator_->GetCurrentMembers(group_id_)) {
OnMemberLeftGroup(member);
while (!snoopers_.empty()) {
OnMemberLeftGroup(snoopers_.begin()->first);
}
}
DCHECK(snoopers_.empty());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment