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}
diff --git a/pc/peer_connection.h b/pc/peer_connection.h
index d33c658..4aeac1c 100644
--- a/pc/peer_connection.h
+++ b/pc/peer_connection.h
@@ -1184,10 +1184,10 @@
// 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