Index: webrtc/pc/peerconnection.cc |
diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc |
index cbd0d4b25a861b788e7f65d478ebf749ba90c1b6..1f84dbfd308ca20551ae02d6dc63894d17fc76c4 100644 |
--- a/webrtc/pc/peerconnection.cc |
+++ b/webrtc/pc/peerconnection.cc |
@@ -1014,10 +1014,7 @@ bool PeerConnection::GetStats(StatsObserver* observer, |
StatsOutputLevel level) { |
TRACE_EVENT0("webrtc", "PeerConnection::GetStats"); |
RTC_DCHECK(signaling_thread()->IsCurrent()); |
- if (!VERIFY(observer != NULL)) { |
- LOG(LS_ERROR) << "GetStats - observer is NULL."; |
- return false; |
- } |
+ RTC_DCHECK(observer != nullptr); |
kwiberg-webrtc
2017/01/30 10:12:49
RTC_DCHECK_NE? Or will that not compile?
(You cou
nisse-webrtc
2017/01/30 10:58:41
It fails to compile, with errors related to << and
|
stats_->UpdateStats(level); |
// The StatsCollector is used to tell if a track is valid because it may |
@@ -1097,10 +1094,7 @@ PeerConnection::CreateDataChannel( |
void PeerConnection::CreateOffer(CreateSessionDescriptionObserver* observer, |
const MediaConstraintsInterface* constraints) { |
TRACE_EVENT0("webrtc", "PeerConnection::CreateOffer"); |
- if (!VERIFY(observer != nullptr)) { |
- LOG(LS_ERROR) << "CreateOffer - observer is NULL."; |
- return; |
- } |
+ RTC_DCHECK(observer != nullptr); |
RTCOfferAnswerOptions options; |
bool value; |
@@ -1149,10 +1143,7 @@ void PeerConnection::CreateOffer(CreateSessionDescriptionObserver* observer, |
void PeerConnection::CreateOffer(CreateSessionDescriptionObserver* observer, |
const RTCOfferAnswerOptions& options) { |
TRACE_EVENT0("webrtc", "PeerConnection::CreateOffer"); |
- if (!VERIFY(observer != nullptr)) { |
- LOG(LS_ERROR) << "CreateOffer - observer is NULL."; |
- return; |
- } |
+ RTC_DCHECK(observer != nullptr); |
cricket::MediaSessionOptions session_options; |
if (!GetOptionsForOffer(options, &session_options)) { |
@@ -1169,10 +1160,7 @@ void PeerConnection::CreateAnswer( |
CreateSessionDescriptionObserver* observer, |
const MediaConstraintsInterface* constraints) { |
TRACE_EVENT0("webrtc", "PeerConnection::CreateAnswer"); |
- if (!VERIFY(observer != nullptr)) { |
- LOG(LS_ERROR) << "CreateAnswer - observer is NULL."; |
- return; |
- } |
+ RTC_DCHECK(observer != nullptr); |
cricket::MediaSessionOptions session_options; |
if (!GetOptionsForAnswer(constraints, &session_options)) { |
@@ -1188,10 +1176,7 @@ void PeerConnection::CreateAnswer( |
void PeerConnection::CreateAnswer(CreateSessionDescriptionObserver* observer, |
const RTCOfferAnswerOptions& options) { |
TRACE_EVENT0("webrtc", "PeerConnection::CreateAnswer"); |
- if (!VERIFY(observer != nullptr)) { |
- LOG(LS_ERROR) << "CreateAnswer - observer is NULL."; |
- return; |
- } |
+ RTC_DCHECK(observer != nullptr); |
cricket::MediaSessionOptions session_options; |
if (!GetOptionsForAnswer(options, &session_options)) { |
@@ -1211,10 +1196,7 @@ void PeerConnection::SetLocalDescription( |
if (IsClosed()) { |
return; |
} |
- if (!VERIFY(observer != nullptr)) { |
- LOG(LS_ERROR) << "SetLocalDescription - observer is NULL."; |
- return; |
- } |
+ RTC_DCHECK(observer != nullptr); |
if (!desc) { |
PostSetSessionDescriptionFailure(observer, "SessionDescription is NULL."); |
return; |
@@ -1293,10 +1275,7 @@ void PeerConnection::SetRemoteDescription( |
if (IsClosed()) { |
return; |
} |
- if (!VERIFY(observer != nullptr)) { |
- LOG(LS_ERROR) << "SetRemoteDescription - observer is NULL."; |
- return; |
- } |
+ RTC_DCHECK(observer != nullptr); |
if (!desc) { |
PostSetSessionDescriptionFailure(observer, "SessionDescription is NULL."); |
return; |
@@ -2190,7 +2169,8 @@ void PeerConnection::UpdateLocalRtpDataChannels( |
// track label is the same as |streamid|. |
const std::string& channel_label = params.sync_label; |
auto data_channel_it = rtp_data_channels_.find(channel_label); |
- if (!VERIFY(data_channel_it != rtp_data_channels_.end())) { |
+ if (data_channel_it == rtp_data_channels_.end()) { |
+ LOG(LS_ERROR) << "channel label not found"; |
continue; |
} |
// Set the SSRC the data channel should use for sending. |