summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/pc/dtls_transport.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /third_party/libwebrtc/pc/dtls_transport.h
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--third_party/libwebrtc/pc/dtls_transport.h18
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_;
};