| Index: webrtc/pc/peerconnection.cc
|
| diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc
|
| index e22a09ece06998d12cd2db9dba82c4f0231b368c..b258c1fc999c887c172d93a958d5f7c072ab3f19 100644
|
| --- a/webrtc/pc/peerconnection.cc
|
| +++ b/webrtc/pc/peerconnection.cc
|
| @@ -425,9 +425,11 @@ PeerConnection::~PeerConnection() {
|
| // port_allocator_ lives on the network thread and should be destroyed there.
|
| network_thread()->Invoke<void>(RTC_FROM_HERE,
|
| [this] { port_allocator_.reset(); });
|
| - // call_ must be destroyed on the worker thread.
|
| - factory_->worker_thread()->Invoke<void>(RTC_FROM_HERE,
|
| - [this] { call_.reset(); });
|
| + // call_ and event_log_ must be destroyed on the worker thread.
|
| + factory_->worker_thread()->Invoke<void>(RTC_FROM_HERE, [this] {
|
| + call_.reset();
|
| + event_log_.reset();
|
| + });
|
| }
|
|
|
| bool PeerConnection::Initialize(
|
| @@ -1337,11 +1339,11 @@ void PeerConnection::Close() {
|
| rtc::Bind(&cricket::PortAllocator::DiscardCandidatePool,
|
| port_allocator_.get()));
|
|
|
| - factory_->worker_thread()->Invoke<void>(RTC_FROM_HERE,
|
| - [this] { call_.reset(); });
|
| -
|
| - // The event log must outlive call (and any other object that uses it).
|
| - event_log_.reset();
|
| + factory_->worker_thread()->Invoke<void>(RTC_FROM_HERE, [this] {
|
| + call_.reset();
|
| + // The event log must outlive call (and any other object that uses it).
|
| + event_log_.reset();
|
| + });
|
| }
|
|
|
| void PeerConnection::OnSessionStateChange(WebRtcSession* /*session*/,
|
|
|