aboutsummaryrefslogtreecommitdiff
path: root/p2p/BUILD.gn
diff options
context:
space:
mode:
authorMarkus Handell <handellm@webrtc.org>2020-05-26 18:22:24 +0200
committerCommit Bot <commit-bot@chromium.org>2020-05-26 18:10:00 +0000
commitff84d86d9c57bf154e9329ac29f6cb0448be5e8e (patch)
tree984a4339f72105031b62b3323c50cf03688bd637 /p2p/BUILD.gn
parentb7c63ab83ae2b991ff8350bc0aa6427588629287 (diff)
downloadwebrtc-ff84d86d9c57bf154e9329ac29f6cb0448be5e8e.tar.gz
P2PTransportChannel::OnCandidateResolved: fix resolver leak.
This change fixes a problem where the eventual destruction of a completed resolver sometimes doesn't happen. This is because the destruction is posted to the network thread, and if it's destroyed before the closure is executed, the resolver is leaked. The fix is in three parts: 1. The resolver->Destroy call is performed on closure destruction to make sure it will always run. 2. The closure is executed with task queue. This because the RTC_DCHECK on thread:140 fires with the invoker_. 3. It's not possible to guarantee the context Destroy is called on due to TaskQueue semantics. Therefore SignalThread::Destroy was changed to accept any calling context and only requiring it's the last public call to the object. For unknown reasons, this leak doesn't trigger the leak checker, see referred bugs for further investigation. Bug: webrtc:7723, webrtc:11605, chromium:905542 Change-Id: I2681ff1d2416ccbc564974a65ac84781a9ed7aee Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176125 Commit-Queue: Markus Handell <handellm@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31359}
Diffstat (limited to 'p2p/BUILD.gn')
-rw-r--r--p2p/BUILD.gn1
1 files changed, 1 insertions, 0 deletions
diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn
index ae49deb264..e9c01cde3d 100644
--- a/p2p/BUILD.gn
+++ b/p2p/BUILD.gn
@@ -107,6 +107,7 @@ rtc_library("rtc_p2p") {
"../rtc_base/memory:fifo_buffer",
"../rtc_base/network:sent_packet",
"../rtc_base/system:rtc_export",
+ "../rtc_base/task_utils:to_queued_task",
"../rtc_base/third_party/base64",
"../rtc_base/third_party/sigslot",
"../system_wrappers:field_trial",