Add DCHECK on the port allocator in P2PTransportChannel.
Methods of P2PTransportChannel have been assuming a non-null port allocator for a long time, and yet the constructor does not check for that. With the recent change that wires a signal in the port allocator to the transport in the constructor, a valid allocator becomes a must. Bug: None Change-Id: I4ec2e5b577d74a598ee3c2f8ad59e9f0285ac4b9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135880 Reviewed-by: Steve Anton <steveanton@webrtc.org> Commit-Queue: Qingsi Wang <qingsi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27897}
This commit is contained in:
@ -142,6 +142,7 @@ P2PTransportChannel::P2PTransportChannel(
|
|||||||
true /* presume_writable_when_fully_relayed */,
|
true /* presume_writable_when_fully_relayed */,
|
||||||
REGATHER_ON_FAILED_NETWORKS_INTERVAL,
|
REGATHER_ON_FAILED_NETWORKS_INTERVAL,
|
||||||
RECEIVING_SWITCHING_DELAY) {
|
RECEIVING_SWITCHING_DELAY) {
|
||||||
|
RTC_DCHECK(allocator_ != nullptr);
|
||||||
weak_ping_interval_ = GetWeakPingIntervalInFieldTrial();
|
weak_ping_interval_ = GetWeakPingIntervalInFieldTrial();
|
||||||
// Validate IceConfig even for mostly built-in constant default values in case
|
// Validate IceConfig even for mostly built-in constant default values in case
|
||||||
// we change them.
|
// we change them.
|
||||||
|
Reference in New Issue
Block a user