diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:50 +0000 |
commit | def92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch) | |
tree | 2ef34b9ad8bb9a9220e05d60352558b15f513894 /third_party/libwebrtc/pc/dtls_transport.h | |
parent | Adding debian version 125.0.3-1. (diff) | |
download | firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/pc/dtls_transport.h')
-rw-r--r-- | third_party/libwebrtc/pc/dtls_transport.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/third_party/libwebrtc/pc/dtls_transport.h b/third_party/libwebrtc/pc/dtls_transport.h index cca4cc980a..a1893297e6 100644 --- a/third_party/libwebrtc/pc/dtls_transport.h +++ b/third_party/libwebrtc/pc/dtls_transport.h @@ -12,6 +12,7 @@ #define PC_DTLS_TRANSPORT_H_ #include <memory> +#include <utility> #include "api/dtls_transport_interface.h" #include "api/ice_transport_interface.h" @@ -40,18 +41,22 @@ class DtlsTransport : public DtlsTransportInterface { std::unique_ptr<cricket::DtlsTransportInternal> internal); rtc::scoped_refptr<IceTransportInterface> ice_transport() override; + + // Currently called from the signaling thread and potentially Chromium's + // JS thread. DtlsTransportInformation Information() override; + void RegisterObserver(DtlsTransportObserverInterface* observer) override; void UnregisterObserver() override; void Clear(); cricket::DtlsTransportInternal* internal() { - MutexLock lock(&lock_); + RTC_DCHECK_RUN_ON(owner_thread_); return internal_dtls_transport_.get(); } const cricket::DtlsTransportInternal* internal() const { - MutexLock lock(&lock_); + RTC_DCHECK_RUN_ON(owner_thread_); return internal_dtls_transport_.get(); } @@ -63,12 +68,19 @@ class DtlsTransport : public DtlsTransportInterface { DtlsTransportState state); void UpdateInformation(); + // Called when changing `info_`. We only change the values from the + // `owner_thread_` (a.k.a. the network thread). + void set_info(DtlsTransportInformation&& info) RTC_RUN_ON(owner_thread_) { + MutexLock lock(&lock_); + info_ = std::move(info); + } + DtlsTransportObserverInterface* observer_ = nullptr; rtc::Thread* owner_thread_; mutable Mutex lock_; DtlsTransportInformation info_ RTC_GUARDED_BY(lock_); std::unique_ptr<cricket::DtlsTransportInternal> internal_dtls_transport_ - RTC_GUARDED_BY(lock_); + RTC_GUARDED_BY(owner_thread_); const rtc::scoped_refptr<IceTransportWithPointer> ice_transport_; }; |