Fix destruction order of PortAllocator and PacketSocketFactory.

PortAllocator depends on PacketSocketFactory, so it should be deleted
afterwords in case its created sockets depend on the resources owned
by the factory.

Bug: None
Change-Id: I7716c552d371b78360db656cc2f4fd03415d0e00
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182881
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32020}
This commit is contained in:
Taylor Brandstetter
2020-08-28 16:47:02 -07:00
committed by Commit Bot
parent 7b69a44c8b
commit 9e02f4716a

View File

@ -1184,10 +1184,10 @@ class PeerConnection : public PeerConnectionInternal,
// is not injected. It should be required once chromium supplies it.
std::unique_ptr<AsyncResolverFactory> async_resolver_factory_
RTC_GUARDED_BY(signaling_thread());
std::unique_ptr<rtc::PacketSocketFactory> packet_socket_factory_;
std::unique_ptr<cricket::PortAllocator>
port_allocator_; // TODO(bugs.webrtc.org/9987): Accessed on both
// signaling and network thread.
std::unique_ptr<rtc::PacketSocketFactory> packet_socket_factory_;
std::unique_ptr<webrtc::IceTransportFactory>
ice_transport_factory_; // TODO(bugs.webrtc.org/9987): Accessed on the
// signaling thread but the underlying raw