Add RTC_PT_GUARDED_BY to sdp_handler_
As suggested in another review. Also add one more guard, and some commentary. Bug: None Change-Id: I9b84453ff2533fe01d157fe84f07405d352e1dc7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235820 Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35245}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
5316a061ca
commit
00c62eddf4
@ -2880,6 +2880,7 @@ bool PeerConnection::ShouldFireNegotiationNeededEvent(uint32_t event_id) {
|
||||
}
|
||||
|
||||
void PeerConnection::RequestUsagePatternReportForTesting() {
|
||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
||||
message_handler_.RequestUsagePatternReport(
|
||||
[this]() {
|
||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
||||
|
@ -288,6 +288,7 @@ class PeerConnection : public PeerConnectionInternal,
|
||||
}
|
||||
|
||||
sigslot::signal1<SctpDataChannel*>& SignalSctpDataChannelCreated() override {
|
||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
||||
return data_channel_controller_.SignalSctpDataChannelCreated();
|
||||
}
|
||||
|
||||
@ -676,7 +677,7 @@ class PeerConnection : public PeerConnectionInternal,
|
||||
|
||||
// The machinery for handling offers and answers. Const after initialization.
|
||||
std::unique_ptr<SdpOfferAnswerHandler> sdp_handler_
|
||||
RTC_GUARDED_BY(signaling_thread());
|
||||
RTC_GUARDED_BY(signaling_thread()) RTC_PT_GUARDED_BY(signaling_thread());
|
||||
|
||||
const bool dtls_enabled_;
|
||||
|
||||
@ -684,20 +685,24 @@ class PeerConnection : public PeerConnectionInternal,
|
||||
bool return_histogram_very_quickly_ RTC_GUARDED_BY(signaling_thread()) =
|
||||
false;
|
||||
|
||||
// The DataChannelController is accessed from both the signaling thread
|
||||
// and networking thread. It is a thread-aware object.
|
||||
DataChannelController data_channel_controller_;
|
||||
|
||||
// Machinery for handling messages posted to oneself
|
||||
PeerConnectionMessageHandler message_handler_;
|
||||
PeerConnectionMessageHandler message_handler_
|
||||
RTC_GUARDED_BY(signaling_thread());
|
||||
|
||||
// Administration of senders, receivers and transceivers
|
||||
// Accessed on both signaling and network thread. Const after Initialize().
|
||||
std::unique_ptr<RtpTransmissionManager> rtp_manager_;
|
||||
|
||||
rtc::WeakPtrFactory<PeerConnection> weak_factory_;
|
||||
|
||||
// Did the connectionState ever change to `connected`?
|
||||
// Used to gather metrics only the first such state change.
|
||||
bool was_ever_connected_ RTC_GUARDED_BY(signaling_thread()) = false;
|
||||
|
||||
// This variable needs to be the last one in the class.
|
||||
rtc::WeakPtrFactory<PeerConnection> weak_factory_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
Reference in New Issue
Block a user