Invalidate weak pointers in SdpOfferAnswerHandler::Close().
This stops pending internal callbacks from performing unnecessary operations when closed. Also update tests pc tests to call Close(). This will allow PeerConnection to be able to expect the normal path to be that IsClosed() be true in the dtor once all 'normal' paths do that Bug: webrtc:12633 Change-Id: I3882bedf200feda0d04594adeb0fdac85bfef652 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213426 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33617}
This commit is contained in:
committed by
Commit Bot
parent
0f030fd263
commit
2efb8a5ec6
@ -323,7 +323,8 @@ class PeerConnection : public PeerConnectionInternal,
|
||||
PeerConnectionObserver* Observer() const;
|
||||
bool IsClosed() const {
|
||||
RTC_DCHECK_RUN_ON(signaling_thread());
|
||||
return sdp_handler_->signaling_state() == PeerConnectionInterface::kClosed;
|
||||
return !sdp_handler_ ||
|
||||
sdp_handler_->signaling_state() == PeerConnectionInterface::kClosed;
|
||||
}
|
||||
// Get current SSL role used by SCTP's underlying transport.
|
||||
bool GetSctpSslRole(rtc::SSLRole* role);
|
||||
|
||||
Reference in New Issue
Block a user