Delete workaround Thread implementation that do not set self as TaskQueue Bug: webrtc:42221679 Change-Id: I954c622956158997840960ba4cde2955780f4894 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/470980 Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47668}
diff --git a/video/BUILD.gn b/video/BUILD.gn index f9307fd..e8d61bc 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn
@@ -167,7 +167,6 @@ "../rtc_base:safe_conversions", "../rtc_base:sample_counter", "../rtc_base:stringutils", - "../rtc_base:threading", "../rtc_base:timeutils", "../rtc_base/experiments:alr_experiment", "../rtc_base/experiments:corruption_detection_frame_selector_settings",
diff --git a/video/receive_statistics_proxy.cc b/video/receive_statistics_proxy.cc index ba8313a..b8955f3 100644 --- a/video/receive_statistics_proxy.cc +++ b/video/receive_statistics_proxy.cc
@@ -37,7 +37,6 @@ #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/strings/string_builder.h" -#include "rtc_base/thread.h" #include "rtc_base/time_utils.h" #include "system_wrappers/include/clock.h" #include "system_wrappers/include/metrics.h" @@ -70,20 +69,6 @@ return "WebRTC.Video"; } -// TODO(https://bugs.webrtc.org/11572): Workaround for an issue with some -// webrtc::Thread instances and/or implementations that don't register as the -// current task queue. -bool IsCurrentTaskQueueOrThread(TaskQueueBase* task_queue) { - if (task_queue->IsCurrent()) - return true; - - Thread* current_thread = ThreadManager::Instance()->CurrentThread(); - if (!current_thread) - return false; - - return static_cast<TaskQueueBase*>(current_thread) == task_queue; -} - } // namespace ReceiveStatisticsProxy::ReceiveStatisticsProxy(uint32_t remote_ssrc, @@ -575,7 +560,7 @@ if (ssrc != remote_ssrc_) return; - if (!IsCurrentTaskQueueOrThread(worker_thread_)) { + if (!worker_thread_->IsCurrent()) { // RtpRtcpInterface::Configuration has a single // RtcpPacketTypeCounterObserver and that same configuration may be used for // both receiver and sender (see ModuleRtpRtcpImpl::ModuleRtpRtcpImpl). The