Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: webrtc/pc/channel.h

Issue 1970223002: Fix race in BaseChannel destructor when network thread differ from worker thread (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/pc/channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 const std::vector<ConnectionInfo>& infos) = 0; 307 const std::vector<ConnectionInfo>& infos) = 0;
308 308
309 // Helper function for invoking bool-returning methods on the worker thread. 309 // Helper function for invoking bool-returning methods on the worker thread.
310 template <class FunctorT> 310 template <class FunctorT>
311 bool InvokeOnWorker(const FunctorT& functor) { 311 bool InvokeOnWorker(const FunctorT& functor) {
312 return worker_thread_->Invoke<bool>(functor); 312 return worker_thread_->Invoke<bool>(functor);
313 } 313 }
314 314
315 private: 315 private:
316 bool InitNetwork_n(); 316 bool InitNetwork_n();
317 void DeinitNetwork_n(); 317 void DisconnectTransportChannels_n();
318 void DestroyTransportChannels_n();
318 void SignalSentPacket_n(TransportChannel* channel, 319 void SignalSentPacket_n(TransportChannel* channel,
319 const rtc::SentPacket& sent_packet); 320 const rtc::SentPacket& sent_packet);
320 void SignalSentPacket_w(const rtc::SentPacket& sent_packet); 321 void SignalSentPacket_w(const rtc::SentPacket& sent_packet);
321 bool IsTransportReadyToSend_n() const; 322 bool IsTransportReadyToSend_n() const;
322 void CacheRtpAbsSendTimeHeaderExtension_n(int rtp_abs_sendtime_extn_id); 323 void CacheRtpAbsSendTimeHeaderExtension_n(int rtp_abs_sendtime_extn_id);
323 324
324 rtc::Thread* const worker_thread_; 325 rtc::Thread* const worker_thread_;
325 rtc::Thread* const network_thread_; 326 rtc::Thread* const network_thread_;
326 rtc::AsyncInvoker invoker_; 327 rtc::AsyncInvoker invoker_;
327 328
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 // SetSendParameters. 658 // SetSendParameters.
658 DataSendParameters last_send_params_; 659 DataSendParameters last_send_params_;
659 // Last DataRecvParameters sent down to the media_channel() via 660 // Last DataRecvParameters sent down to the media_channel() via
660 // SetRecvParameters. 661 // SetRecvParameters.
661 DataRecvParameters last_recv_params_; 662 DataRecvParameters last_recv_params_;
662 }; 663 };
663 664
664 } // namespace cricket 665 } // namespace cricket
665 666
666 #endif // WEBRTC_PC_CHANNEL_H_ 667 #endif // WEBRTC_PC_CHANNEL_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/pc/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698