Replace ASSERT(false) by RTC_NOTREACHED().
This cl was produced by
git grep -l 'ASSERT(false)' |\
xargs -n1 sed -i 's/ASSERT(false)/RTC_NOTREACHED()/'
followed by additional includes of base/checks.h in affected files,
git cl format to adjust spacing in webrtc/base/transformadapter.cc.
Finally, to make presubmit happy, one unnamed TODO marker was deleted
in that file.
This is a step towards deletion of base/common.h.
BUG=webrtc:6424
Review-Url: https://codereview.webrtc.org/2625003003
Cr-Commit-Position: refs/heads/master@{#16009}
This commit is contained in:
parent
10418acb97
commit
c80e741ad0
@ -14,6 +14,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/thread.h"
|
||||
|
||||
@ -164,7 +165,7 @@ void DtmfSender::OnMessage(rtc::Message* msg) {
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -189,7 +190,7 @@ void DtmfSender::DoInsertDtmf() {
|
||||
if (!GetDtmfCode(tone, &code)) {
|
||||
// The find_first_of(kDtmfValidTones) should have guarantee |tone| is
|
||||
// a valid DTMF tone.
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#include "webrtc/api/videotrack.h"
|
||||
#include "webrtc/base/arraysize.h"
|
||||
#include "webrtc/base/bind.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/stringencode.h"
|
||||
#include "webrtc/base/stringutils.h"
|
||||
@ -399,7 +400,7 @@ uint32_t ConvertIceTransportTypeToCandidateFilter(
|
||||
case PeerConnectionInterface::kAll:
|
||||
return cricket::CF_ALL;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
return cricket::CF_NONE;
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
#include "webrtc/api/test/fakeaudiocapturemodule.h"
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/refcount.h"
|
||||
#include "webrtc/base/thread.h"
|
||||
@ -91,12 +92,12 @@ void FakeAudioCaptureModule::Process() {
|
||||
|
||||
int32_t FakeAudioCaptureModule::ActiveAudioLayer(
|
||||
AudioLayer* /*audio_layer*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
webrtc::AudioDeviceModule::ErrorCode FakeAudioCaptureModule::LastError() const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return webrtc::AudioDeviceModule::kAdmErrNone;
|
||||
}
|
||||
|
||||
@ -125,17 +126,17 @@ int32_t FakeAudioCaptureModule::Terminate() {
|
||||
}
|
||||
|
||||
bool FakeAudioCaptureModule::Initialized() const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int16_t FakeAudioCaptureModule::PlayoutDevices() {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int16_t FakeAudioCaptureModule::RecordingDevices() {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -143,7 +144,7 @@ int32_t FakeAudioCaptureModule::PlayoutDeviceName(
|
||||
uint16_t /*index*/,
|
||||
char /*name*/[webrtc::kAdmMaxDeviceNameSize],
|
||||
char /*guid*/[webrtc::kAdmMaxGuidSize]) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -151,7 +152,7 @@ int32_t FakeAudioCaptureModule::RecordingDeviceName(
|
||||
uint16_t /*index*/,
|
||||
char /*name*/[webrtc::kAdmMaxDeviceNameSize],
|
||||
char /*guid*/[webrtc::kAdmMaxGuidSize]) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -181,7 +182,7 @@ int32_t FakeAudioCaptureModule::SetRecordingDevice(
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::PlayoutIsAvailable(bool* /*available*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -195,7 +196,7 @@ bool FakeAudioCaptureModule::PlayoutIsInitialized() const {
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::RecordingIsAvailable(bool* /*available*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -272,20 +273,20 @@ int32_t FakeAudioCaptureModule::SetAGC(bool /*enable*/) {
|
||||
}
|
||||
|
||||
bool FakeAudioCaptureModule::AGC() const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SetWaveOutVolume(uint16_t /*volume_left*/,
|
||||
uint16_t /*volume_right*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::WaveOutVolume(
|
||||
uint16_t* /*volume_left*/,
|
||||
uint16_t* /*volume_right*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -295,7 +296,7 @@ int32_t FakeAudioCaptureModule::InitSpeaker() {
|
||||
}
|
||||
|
||||
bool FakeAudioCaptureModule::SpeakerIsInitialized() const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -305,46 +306,46 @@ int32_t FakeAudioCaptureModule::InitMicrophone() {
|
||||
}
|
||||
|
||||
bool FakeAudioCaptureModule::MicrophoneIsInitialized() const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SpeakerVolumeIsAvailable(bool* /*available*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SetSpeakerVolume(uint32_t /*volume*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SpeakerVolume(uint32_t* /*volume*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::MaxSpeakerVolume(
|
||||
uint32_t* /*max_volume*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::MinSpeakerVolume(
|
||||
uint32_t* /*min_volume*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SpeakerVolumeStepSize(
|
||||
uint16_t* /*step_size*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::MicrophoneVolumeIsAvailable(
|
||||
bool* /*available*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -368,59 +369,59 @@ int32_t FakeAudioCaptureModule::MaxMicrophoneVolume(
|
||||
|
||||
int32_t FakeAudioCaptureModule::MinMicrophoneVolume(
|
||||
uint32_t* /*min_volume*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::MicrophoneVolumeStepSize(
|
||||
uint16_t* /*step_size*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SpeakerMuteIsAvailable(bool* /*available*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SetSpeakerMute(bool /*enable*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SpeakerMute(bool* /*enabled*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::MicrophoneMuteIsAvailable(bool* /*available*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SetMicrophoneMute(bool /*enable*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::MicrophoneMute(bool* /*enabled*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::MicrophoneBoostIsAvailable(
|
||||
bool* /*available*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SetMicrophoneBoost(bool /*enable*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::MicrophoneBoost(bool* /*enabled*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -439,7 +440,7 @@ int32_t FakeAudioCaptureModule::SetStereoPlayout(bool /*enable*/) {
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::StereoPlayout(bool* /*enabled*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -458,7 +459,7 @@ int32_t FakeAudioCaptureModule::SetStereoRecording(bool enable) {
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::StereoRecording(bool* /*enabled*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -467,7 +468,7 @@ int32_t FakeAudioCaptureModule::SetRecordingChannel(
|
||||
if (channel != AudioDeviceModule::kChannelBoth) {
|
||||
// There is no right or left in mono. I.e. kChannelBoth should be used for
|
||||
// mono.
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@ -482,13 +483,13 @@ int32_t FakeAudioCaptureModule::RecordingChannel(ChannelType* channel) const {
|
||||
|
||||
int32_t FakeAudioCaptureModule::SetPlayoutBuffer(const BufferType /*type*/,
|
||||
uint16_t /*size_ms*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::PlayoutBuffer(BufferType* /*type*/,
|
||||
uint16_t* /*size_ms*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -499,73 +500,73 @@ int32_t FakeAudioCaptureModule::PlayoutDelay(uint16_t* delay_ms) const {
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::RecordingDelay(uint16_t* /*delay_ms*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::CPULoad(uint16_t* /*load*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::StartRawOutputFileRecording(
|
||||
const char /*pcm_file_name_utf8*/[webrtc::kAdmMaxFileNameSize]) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::StopRawOutputFileRecording() {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::StartRawInputFileRecording(
|
||||
const char /*pcm_file_name_utf8*/[webrtc::kAdmMaxFileNameSize]) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::StopRawInputFileRecording() {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SetRecordingSampleRate(
|
||||
const uint32_t /*samples_per_sec*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::RecordingSampleRate(
|
||||
uint32_t* /*samples_per_sec*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SetPlayoutSampleRate(
|
||||
const uint32_t /*samples_per_sec*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::PlayoutSampleRate(
|
||||
uint32_t* /*samples_per_sec*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::ResetAudioDevice() {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::SetLoudspeakerStatus(bool /*enable*/) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t FakeAudioCaptureModule::GetLoudspeakerStatus(bool* /*enabled*/) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -580,7 +581,7 @@ void FakeAudioCaptureModule::OnMessage(rtc::Message* msg) {
|
||||
default:
|
||||
// All existing messages should be caught. Getting here should never
|
||||
// happen.
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -686,7 +687,7 @@ void FakeAudioCaptureModule::ReceiveFrameP() {
|
||||
kNumberOfChannels, kSamplesPerSecond,
|
||||
rec_buffer_, nSamplesOut,
|
||||
&elapsed_time_ms, &ntp_time_ms) != 0) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
ASSERT(nSamplesOut == kNumberSamples);
|
||||
}
|
||||
@ -718,8 +719,7 @@ void FakeAudioCaptureModule::SendFrameP() {
|
||||
kClockDriftMs, current_mic_level,
|
||||
key_pressed,
|
||||
current_mic_level) != 0) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
SetMicrophoneVolume(current_mic_level);
|
||||
}
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include "webrtc/api/jsepicecandidate.h"
|
||||
#include "webrtc/api/jsepsessiondescription.h"
|
||||
#include "webrtc/base/arraysize.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/messagedigest.h"
|
||||
@ -664,7 +665,7 @@ static int GetCandidatePreferenceFromType(const std::string& type) {
|
||||
} else if (type == cricket::RELAY_PORT_TYPE) {
|
||||
preference = kPreferenceRelayed;
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
return preference;
|
||||
}
|
||||
@ -1241,7 +1242,7 @@ void BuildMediaDescription(const ContentInfo* content_info,
|
||||
else if (media_type == cricket::MEDIA_TYPE_DATA)
|
||||
type = kMediaTypeData;
|
||||
else
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
|
||||
std::string fmt;
|
||||
if (media_type == cricket::MEDIA_TYPE_VIDEO) {
|
||||
@ -1830,7 +1831,7 @@ void BuildCandidate(const std::vector<Candidate>& candidates,
|
||||
type = kCandidatePrflx;
|
||||
// Peer reflexive candidate may be signaled for being removed.
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
// Never write out candidates if we don't know the type.
|
||||
continue;
|
||||
}
|
||||
@ -2249,7 +2250,7 @@ static C* ParseContentDescription(const std::string& message,
|
||||
*content_name = cricket::CN_DATA;
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
if (!ParseContent(message, media_type, mline_index, protocol, payload_types,
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
#include "webrtc/api/test/androidtestinitializer.h"
|
||||
#endif
|
||||
#include "webrtc/api/webrtcsdp.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/gunit.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/messagedigest.h"
|
||||
@ -1360,7 +1361,7 @@ class WebRtcSdpTest : public testing::Test {
|
||||
} else if (mline_index == 1) {
|
||||
content_name = kVideoContentName;
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
TransportInfo transport_info(
|
||||
content_name, TransportDescription(ufrag, pwd));
|
||||
|
||||
@ -393,7 +393,7 @@ static std::string GetStateString(webrtc::WebRtcSession::State state) {
|
||||
GET_STRING_OF_STATE(STATE_INPROGRESS)
|
||||
GET_STRING_OF_STATE(STATE_CLOSED)
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
@ -1503,7 +1503,7 @@ void WebRtcSession::OnTransportControllerConnectionState(
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include "webrtc/api/videotrack.h"
|
||||
#include "webrtc/api/webrtcsession.h"
|
||||
#include "webrtc/api/webrtcsessiondescriptionfactory.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/fakenetwork.h"
|
||||
#include "webrtc/base/firewallsocketserver.h"
|
||||
#include "webrtc/base/gunit.h"
|
||||
@ -189,7 +190,7 @@ class MockIceObserver : public webrtc::IceObserver {
|
||||
mline_1_candidates_.push_back(candidate->candidate());
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
// The ICE gathering state should always be Gathering when a candidate is
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include "webrtc/api/jsepsessiondescription.h"
|
||||
#include "webrtc/api/mediaconstraintsinterface.h"
|
||||
#include "webrtc/api/webrtcsession.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/sslidentity.h"
|
||||
|
||||
using cricket::MediaSessionOptions;
|
||||
@ -331,7 +332,7 @@ void WebRtcSessionDescriptionFactory::OnMessage(rtc::Message* msg) {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "webrtc/base/autodetectproxy.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/httpcommon.h"
|
||||
#include "webrtc/base/httpcommon-inl.h"
|
||||
#include "webrtc/base/nethelpers.h"
|
||||
@ -236,7 +237,7 @@ void AutoDetectProxy::OnConnectEvent(AsyncSocket * socket) {
|
||||
probe.assign("\005\001\000", 3);
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -271,7 +272,7 @@ void AutoDetectProxy::OnReadEvent(AsyncSocket * socket) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "webrtc/base/arraysize.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/diskcache.h"
|
||||
#include "webrtc/base/fileutils.h"
|
||||
@ -262,7 +263,7 @@ std::string DiskCache::IdToFilename(const std::string& id, size_t index) const {
|
||||
#else // !TRANSPARENT_CACHE_NAMES
|
||||
// We might want to just use a hash of the filename at some point, both for
|
||||
// obfuscation, and to avoid both filename length and escaping issues.
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
#endif // !TRANSPARENT_CACHE_NAMES
|
||||
|
||||
char extension[32];
|
||||
@ -319,7 +320,7 @@ void DiskCache::ReleaseResource(const std::string& id, size_t index) const {
|
||||
const Entry* entry = GetEntry(id);
|
||||
if (!entry) {
|
||||
LOG_F(LS_WARNING) << "Missing cache entry";
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#define SEC_E_CERT_EXPIRED (-2146893016)
|
||||
#endif // !WEBRTC_WIN
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/httpbase.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
@ -64,7 +65,7 @@ HttpParser::Process(const char* buffer, size_t len, size_t* processed,
|
||||
*error = HE_NONE;
|
||||
|
||||
if (state_ >= ST_COMPLETE) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return PR_COMPLETE;
|
||||
}
|
||||
|
||||
@ -206,7 +207,7 @@ HttpParser::ProcessLine(const char* line, size_t len, HttpError* error) {
|
||||
break;
|
||||
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -376,7 +377,7 @@ HttpBase::isConnected() const {
|
||||
bool
|
||||
HttpBase::attach(StreamInterface* stream) {
|
||||
if ((mode_ != HM_NONE) || (http_stream_ != NULL) || (stream == NULL)) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
http_stream_ = stream;
|
||||
@ -702,7 +703,7 @@ HttpBase::flush_data() {
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include "webrtc/base/asyncsocket.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/diskcache.h"
|
||||
#include "webrtc/base/httpclient.h"
|
||||
@ -336,7 +337,7 @@ StreamInterface* HttpClient::GetDocumentStream() {
|
||||
void HttpClient::start() {
|
||||
if (base_.mode() != HM_NONE) {
|
||||
// call reset() to abort an in-progress request
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -345,7 +346,7 @@ void HttpClient::start() {
|
||||
if (request().hasHeader(HH_TRANSFER_ENCODING, NULL)) {
|
||||
// Exact size must be known on the client. Instead of using chunked
|
||||
// encoding, wrap data with auto-caching file or memory stream.
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -815,7 +816,7 @@ void HttpClient::onHttpComplete(HttpMode mode, HttpError err) {
|
||||
void HttpClient::onHttpClosed(HttpError err) {
|
||||
// This shouldn't occur, since we return the stream to the pool upon command
|
||||
// completion.
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include "webrtc/base/httpcommon-inl.h"
|
||||
|
||||
#include "webrtc/base/asyncsocket.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/httpserver.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
@ -100,7 +101,7 @@ void
|
||||
HttpServer::Remove(int connection_id) {
|
||||
ConnectionMap::iterator it = connections_.find(connection_id);
|
||||
if (it == connections_.end()) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return;
|
||||
}
|
||||
Connection* connection = it->second;
|
||||
@ -216,7 +217,7 @@ HttpServer::Connection::onHttpComplete(HttpMode mode, HttpError err) {
|
||||
current_->response.clear(true);
|
||||
base_.recv(¤t_->request);
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
#endif // defined(WEBRTC_POSIX) && !defined(__native_client__)
|
||||
|
||||
#include "webrtc/base/byteorder.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/signalthread.h"
|
||||
|
||||
@ -34,7 +35,7 @@ namespace rtc {
|
||||
int ResolveHostname(const std::string& hostname, int family,
|
||||
std::vector<IPAddress>* addresses) {
|
||||
#ifdef __native_client__
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
LOG(LS_WARNING) << "ResolveHostname() is not implemented for NaCl";
|
||||
return -1;
|
||||
#else // __native_client__
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/networkmonitor.h"
|
||||
#include "webrtc/base/socket.h" // includes something that makes windows happy
|
||||
@ -407,7 +408,7 @@ void BasicNetworkManager::OnNetworksChanged() {
|
||||
|
||||
bool BasicNetworkManager::CreateNetworks(bool include_ignored,
|
||||
NetworkList* networks) const {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
LOG(LS_WARNING) << "BasicNetworkManager doesn't work on NaCl yet";
|
||||
return false;
|
||||
}
|
||||
@ -785,7 +786,7 @@ void BasicNetworkManager::OnMessage(Message* msg) {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@
|
||||
#include "webrtc/base/arraysize.h"
|
||||
#include "webrtc/base/basictypes.h"
|
||||
#include "webrtc/base/byteorder.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/networkmonitor.h"
|
||||
@ -479,7 +480,7 @@ int PhysicalSocket::EstimateMTU(uint16_t* mtu) {
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return -1;
|
||||
#elif defined(WEBRTC_MAC)
|
||||
// No simple way to do this on Mac OS X.
|
||||
@ -595,7 +596,7 @@ int PhysicalSocket::TranslateOption(Option opt, int* slevel, int* sopt) {
|
||||
case OPT_RTP_SENDTIME_EXTN_ID:
|
||||
return -1; // No logging is necessary as this not a OS socket option.
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@ -854,7 +855,7 @@ class EventDispatcher : public Dispatcher {
|
||||
}
|
||||
}
|
||||
|
||||
void OnEvent(uint32_t ff, int err) override { ASSERT(false); }
|
||||
void OnEvent(uint32_t ff, int err) override { RTC_NOTREACHED(); }
|
||||
|
||||
int GetDescriptor() override { return afd_[0]; }
|
||||
|
||||
@ -1499,7 +1500,7 @@ bool PhysicalSocketServer::Wait(int cmsWait, bool process_io) {
|
||||
// Failed?
|
||||
// TODO(pthatcher): need a better strategy than this!
|
||||
WSAGetLastError();
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return false;
|
||||
} else if (dw == WSA_WAIT_TIMEOUT) {
|
||||
// Timeout?
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
#include "webrtc/base/signalthread.h"
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
|
||||
namespace rtc {
|
||||
@ -47,7 +48,7 @@ void SignalThread::Start() {
|
||||
OnWorkStart();
|
||||
worker_.Start();
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,7 +71,7 @@ void SignalThread::Destroy(bool wait) {
|
||||
refcount_--;
|
||||
}
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,7 +84,7 @@ void SignalThread::Release() {
|
||||
state_ = kReleasing;
|
||||
} else {
|
||||
// if (kInit == state_) use Destroy()
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "webrtc/base/bytebuffer.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/httpcommon.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
@ -105,7 +106,7 @@ void BufferedReadAdapter::OnReadEvent(AsyncSocket * socket) {
|
||||
|
||||
if (data_len_ >= buffer_size_) {
|
||||
LOG(INFO) << "Input buffer overflow";
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
data_len_ = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#include <iomanip>
|
||||
|
||||
#include "webrtc/base/asyncsocket.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/socketfactory.h"
|
||||
#include "webrtc/base/socketpool.h"
|
||||
@ -82,7 +83,7 @@ void StreamCache::ReturnConnectedStream(StreamInterface* stream) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
void StreamCache::OnStreamEvent(StreamInterface* stream, int events, int err) {
|
||||
@ -103,7 +104,7 @@ void StreamCache::OnStreamEvent(StreamInterface* stream, int events, int err) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/base/basictypes.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/messagequeue.h"
|
||||
@ -486,7 +487,7 @@ bool FileStream::Flush() {
|
||||
return (0 == fflush(file_));
|
||||
}
|
||||
// try to flush empty file?
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -495,7 +496,7 @@ bool FileStream::Flush() {
|
||||
bool FileStream::TryLock() {
|
||||
if (file_ == NULL) {
|
||||
// Stream not open.
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -505,7 +506,7 @@ bool FileStream::TryLock() {
|
||||
bool FileStream::Unlock() {
|
||||
if (file_ == NULL) {
|
||||
// Stream not open.
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
|
||||
namespace rtc {
|
||||
@ -122,7 +123,7 @@ TransformAdapter::Write(const void * data, size_t data_len,
|
||||
// Note: Don't signal SR_EOS this iteration, unless no data written
|
||||
state_ = ST_COMPLETE;
|
||||
} else if (result == SR_ERROR) {
|
||||
ASSERT(false); // When this happens, think about what should be done
|
||||
RTC_NOTREACHED(); // When this happens, think about what should be done
|
||||
state_ = ST_ERROR;
|
||||
error_ = -1; // TODO: propagate error
|
||||
break;
|
||||
@ -140,7 +141,7 @@ TransformAdapter::Write(const void * data, size_t data_len,
|
||||
&subwritten,
|
||||
&error_);
|
||||
if (result == SR_BLOCK) {
|
||||
ASSERT(false); // TODO: we should handle this
|
||||
RTC_NOTREACHED(); // We should handle this
|
||||
return SR_BLOCK;
|
||||
} else if (result == SR_ERROR) {
|
||||
state_ = ST_ERROR;
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "webrtc/base/arraysize.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/fileutils.h"
|
||||
#include "webrtc/base/pathutils.h"
|
||||
#include "webrtc/base/stream.h"
|
||||
@ -117,7 +118,7 @@ std::string Win32Filesystem::TempFilename(const Pathname &dir,
|
||||
if (::GetTempFileName(ToUtf16(dir.pathname()).c_str(),
|
||||
ToUtf16(prefix).c_str(), 0, filename) != 0)
|
||||
return ToUtf8(filename);
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#include <ws2tcpip.h> // NOLINT
|
||||
|
||||
#include "webrtc/base/byteorder.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/win32window.h"
|
||||
@ -547,7 +548,7 @@ int Win32Socket::EstimateMTU(uint16_t* mtu) {
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -618,7 +619,7 @@ int Win32Socket::TranslateOption(Option opt, int* slevel, int* sopt) {
|
||||
LOG(LS_WARNING) << "Socket::OPT_DSCP not supported.";
|
||||
return -1;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "webrtc/api/test/fakeconstraints.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/json.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
@ -507,7 +508,7 @@ void Conductor::UIThreadCallback(int msg_id, void* data) {
|
||||
}
|
||||
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include "webrtc/examples/peerconnection/client/flagdefs.h"
|
||||
#include "webrtc/examples/peerconnection/client/main_wnd.h"
|
||||
#include "webrtc/examples/peerconnection/client/peer_connection_client.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/ssladapter.h"
|
||||
#include "webrtc/base/win32socketinit.h"
|
||||
#include "webrtc/base/win32socketserver.h"
|
||||
@ -42,7 +43,7 @@ int PASCAL wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
|
||||
|
||||
MainWnd wnd(FLAG_server, FLAG_port, FLAG_autoconnect, FLAG_autocall);
|
||||
if (!wnd.Create()) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -419,7 +419,7 @@ int DtlsTransportChannelWrapper::SendPacket(
|
||||
// Can't send anything when we're closed.
|
||||
return -1;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
#include <set>
|
||||
|
||||
#include "webrtc/api/peerconnectioninterface.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/crc32.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
@ -662,7 +663,7 @@ void P2PTransportChannel::OnUnknownAddress(
|
||||
<< "candidate: " << remote_candidate.ToString();
|
||||
return;
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
port->SendBindingErrorResponse(stun_msg, address,
|
||||
STUN_ERROR_SERVER_ERROR,
|
||||
STUN_ERROR_REASON_SERVER_ERROR);
|
||||
@ -1497,7 +1498,7 @@ void P2PTransportChannel::OnMessage(rtc::Message *pmsg) {
|
||||
OnRegatherOnFailedNetworks();
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include "webrtc/p2p/base/common.h"
|
||||
#include "webrtc/p2p/base/portallocator.h"
|
||||
#include "webrtc/base/base64.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/crc32.h"
|
||||
#include "webrtc/base/helpers.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
@ -538,7 +539,7 @@ bool Port::MaybeIceRoleConflict(
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -791,7 +792,7 @@ class ConnectionRequest : public StunRequest {
|
||||
request->AddAttribute(new StunUInt64Attribute(
|
||||
STUN_ATTR_ICE_CONTROLLED, connection_->port()->IceTiebreaker()));
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
// Adding PRIORITY Attribute.
|
||||
@ -1039,7 +1040,7 @@ void Connection::OnReadPacket(
|
||||
break;
|
||||
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#include "webrtc/p2p/base/stun.h"
|
||||
#include "webrtc/p2p/base/stunrequest.h"
|
||||
#include "webrtc/base/asyncpacketsocket.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/network.h"
|
||||
#include "webrtc/base/proxyinfo.h"
|
||||
#include "webrtc/base/ratetracker.h"
|
||||
@ -247,7 +248,7 @@ class Port : public PortInterface, public rtc::MessageHandler,
|
||||
rtc::AsyncPacketSocket* socket, const char* data, size_t size,
|
||||
const rtc::SocketAddress& remote_addr,
|
||||
const rtc::PacketTime& packet_time) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
#include "webrtc/base/basictypes.h"
|
||||
#include "webrtc/base/bytebuffer.h"
|
||||
#include "webrtc/base/byteorder.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/socket.h"
|
||||
@ -291,7 +292,7 @@ void PseudoTcp::NotifyClock(uint32_t now) {
|
||||
// Check if it's time to retransmit a segment
|
||||
if (m_rto_base && (rtc::TimeDiff32(m_rto_base + m_rx_rto, now) <= 0)) {
|
||||
if (m_slist.empty()) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
} else {
|
||||
// Note: (m_slist.front().xmit == 0)) {
|
||||
// retransmit segments
|
||||
@ -378,7 +379,7 @@ void PseudoTcp::GetOption(Option opt, int* value) {
|
||||
} else if (opt == OPT_RCVBUF) {
|
||||
*value = m_rbuf_len;
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
void PseudoTcp::SetOption(Option opt, int value) {
|
||||
@ -393,7 +394,7 @@ void PseudoTcp::SetOption(Option opt, int value) {
|
||||
ASSERT(m_state == TCP_LISTEN);
|
||||
resizeReceiveBuffer(value);
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -735,7 +736,7 @@ bool PseudoTcp::process(Segment& seg) {
|
||||
<< " rto: " << m_rx_rto;
|
||||
#endif // _DEBUGMSG
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "webrtc/base/asynctcpsocket.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/helpers.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/socketadapters.h"
|
||||
@ -745,7 +746,7 @@ void RelayServerBinding::OnMessage(rtc::Message *pmsg) {
|
||||
}
|
||||
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -264,7 +264,7 @@ Connection* UDPPort::CreateConnection(const Candidate& address,
|
||||
}
|
||||
|
||||
if (SharedSocket() && Candidates()[0].type() != LOCAL_PORT_TYPE) {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -388,7 +388,7 @@ void TransportController::OnMessage(rtc::Message* pmsg) {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -455,7 +455,7 @@ void BasicPortAllocatorSession::OnMessage(rtc::Message *message) {
|
||||
OnConfigStop();
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -975,7 +975,7 @@ void BasicPortAllocatorSession::OnPortDestroyed(
|
||||
return;
|
||||
}
|
||||
}
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
BasicPortAllocatorSession::PortData* BasicPortAllocatorSession::FindPort(
|
||||
@ -1156,7 +1156,7 @@ void AllocationSequence::OnMessage(rtc::Message* msg) {
|
||||
break;
|
||||
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
if (state() == kRunning) {
|
||||
@ -1305,7 +1305,7 @@ void AllocationSequence::CreateRelayPorts() {
|
||||
} else if (relay.type == RELAY_TURN) {
|
||||
CreateTurnPort(relay);
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1448,7 +1448,7 @@ void AllocationSequence::OnPortDestroyed(PortInterface* port) {
|
||||
turn_ports_.erase(it);
|
||||
} else {
|
||||
LOG(LS_ERROR) << "Unexpected OnPortDestroyed for nonexistent port.";
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "webrtc/base/base64.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/helpers.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/stringutils.h"
|
||||
@ -1205,7 +1206,7 @@ std::string MediaTypeToString(MediaType type) {
|
||||
type_str = "data";
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
return type_str;
|
||||
@ -1227,7 +1228,7 @@ std::string MediaContentDirectionToString(MediaContentDirection direction) {
|
||||
dir_str = "sendrecv";
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1269,7 +1270,7 @@ void MediaSessionOptions::RemoveSendStream(MediaType type,
|
||||
return;
|
||||
}
|
||||
}
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
bool MediaSessionOptions::HasSendMediaStream(MediaType type) const {
|
||||
@ -1398,7 +1399,7 @@ SessionDescription* MediaSessionDescriptionFactory::CreateOffer(
|
||||
}
|
||||
data_added = true;
|
||||
} else {
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include "webrtc/sdk/android/src/jni/classreferenceholder.h"
|
||||
#include "webrtc/sdk/android/src/jni/jni_helpers.h"
|
||||
#include "webrtc/base/bind.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/common.h"
|
||||
#include "webrtc/base/ipaddress.h"
|
||||
|
||||
@ -61,7 +62,7 @@ static NetworkType GetNetworkTypeFromJava(JNIEnv* jni, jobject j_network_type) {
|
||||
if (enum_name == "CONNECTION_NONE") {
|
||||
return NetworkType::NETWORK_NONE;
|
||||
}
|
||||
ASSERT(false);
|
||||
RTC_NOTREACHED();
|
||||
return NetworkType::NETWORK_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user