Tommi e8d854eca1 Destroy channel objects synchronously.
This reverts the async operation introduced here:
https://webrtc-review.googlesource.com/c/src/+/248170

The race that happened was that the "flush" operation in the dtor
of ChannelManager, could run _after_ PeerConnection::Close() which
is where the Call object gets deleted. Inside the dtor of Call, there
are DCHECKs that could hit when the pending deletions hadn't run.
In most cases the Invoke() that is used to delete the Call object
would run after the pending tasks, but there's still one code path
that I'm looking for that could trigger the deletion of a channel
after Call is destructed.

Bug: webrtc:11992, webrtc:13540, chromium:1291383
Change-Id: I160742907cc0c097a4b2bb1b7c3da03b4e8cd8d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249780
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35822}
2022-01-28 09:34:25 +00:00
..
2022-01-24 08:50:30 +00:00
2022-01-24 08:50:30 +00:00
2021-08-31 14:27:49 +00:00
2022-01-26 09:02:11 +00:00
2021-05-27 09:56:42 +00:00
2022-01-18 13:46:37 +00:00