Make the PC proxy invoke LookupDtlsTransportByMid on the network thread

Bug: webrtc:12489
Change-Id: I786c968e4ee07c9bbce4a1c850a6f8f0c55810c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208580
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33345}
This commit is contained in:
Tomas Gunnarsson
2021-02-23 21:36:14 +01:00
committed by Commit Bot
parent 5cfcf2282a
commit 2aeab5ed3f
2 changed files with 6 additions and 5 deletions

View File

@ -133,9 +133,11 @@ PROXY_METHOD1(bool, RemoveIceCandidates, const std::vector<cricket::Candidate>&)
PROXY_METHOD1(RTCError, SetBitrate, const BitrateSettings&)
PROXY_METHOD1(void, SetAudioPlayout, bool)
PROXY_METHOD1(void, SetAudioRecording, bool)
PROXY_METHOD1(rtc::scoped_refptr<DtlsTransportInterface>,
LookupDtlsTransportByMid,
const std::string&)
// This method will be invoked on the network thread. See
// PeerConnectionFactory::CreatePeerConnectionOrError for more details.
PROXY_WORKER_METHOD1(rtc::scoped_refptr<DtlsTransportInterface>,
LookupDtlsTransportByMid,
const std::string&)
// This method will be invoked on the network thread. See
// PeerConnectionFactory::CreatePeerConnectionOrError for more details.
PROXY_WORKER_CONSTMETHOD0(rtc::scoped_refptr<SctpTransportInterface>,

View File

@ -1629,8 +1629,7 @@ void PeerConnection::StopRtcEventLog() {
rtc::scoped_refptr<DtlsTransportInterface>
PeerConnection::LookupDtlsTransportByMid(const std::string& mid) {
RTC_DCHECK_RUN_ON(signaling_thread());
// TODO(tommi): Move to the network thread - this hides an invoke.
RTC_DCHECK_RUN_ON(network_thread());
return transport_controller_->LookupDtlsTransportByMid(mid);
}