From 0ebdf2757c585f04eba18c9b4e7dd68910c42e35 Mon Sep 17 00:00:00 2001 From: nisse Date: Mon, 23 Jan 2017 07:43:05 -0800 Subject: [PATCH] Delete or update left-over ASSERT use and comments. BUG=webrtc:6424,webrtc:6323 Review-Url: https://codereview.webrtc.org/2647663002 Cr-Commit-Position: refs/heads/master@{#16215} --- webrtc/base/BUILD.gn | 6 ------ webrtc/base/fileutils.h | 8 ++++---- webrtc/base/unixfilesystem.h | 2 +- webrtc/media/engine/webrtcvoiceengine.cc | 2 +- webrtc/modules/video_capture/windows/sink_filter_ds.cc | 4 ++-- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn index 51882da0f9..16b010015d 100644 --- a/webrtc/base/BUILD.gn +++ b/webrtc/base/BUILD.gn @@ -665,12 +665,6 @@ rtc_static_library("rtc_base") { "unixfilesystem.cc", "unixfilesystem.h", ] - if (is_debug) { - # The Chromium build/common.gypi defines this for all posix - # _except_ for ios & mac. We want it there as well, e.g. - # because ASSERT and friends trigger off of it. - defines += [ "_DEBUG" ] - } } if (is_nacl) { diff --git a/webrtc/base/fileutils.h b/webrtc/base/fileutils.h index 0c19ffc7f7..14d7091e47 100644 --- a/webrtc/base/fileutils.h +++ b/webrtc/base/fileutils.h @@ -92,12 +92,12 @@ class FilesystemInterface { const std::string &mode) = 0; // This will attempt to delete the path located at filename. - // It ASSERTS and returns false if the path points to a folder or a + // It DCHECKs and returns false if the path points to a folder or a // non-existent file. virtual bool DeleteFile(const Pathname &filename) = 0; // This will attempt to delete the empty folder located at 'folder' - // It ASSERTS and returns false if the path points to a file or a non-existent + // It DCHECKs and returns false if the path points to a file or a non-existent // folder. It fails normally if the folder is not empty or can otherwise // not be deleted. virtual bool DeleteEmptyFolder(const Pathname &folder) = 0; @@ -116,13 +116,13 @@ class FilesystemInterface { virtual bool CreateFolder(const Pathname &pathname) = 0; // This moves a file from old_path to new_path, where "old_path" is a - // plain file. This ASSERTs and returns false if old_path points to a + // plain file. This DCHECKs and returns false if old_path points to a // directory, and returns true if the function succeeds. // If the new path is on a different volume than the old path, this function // will attempt to copy and, if that succeeds, delete the old path. virtual bool MoveFile(const Pathname &old_path, const Pathname &new_path) = 0; - // This copies a file from old_path to new_path. This method ASSERTs and + // This copies a file from old_path to new_path. This method DCHECKs and // returns false if old_path is a folder, and returns true if the copy // succeeds. virtual bool CopyFile(const Pathname &old_path, const Pathname &new_path) = 0; diff --git a/webrtc/base/unixfilesystem.h b/webrtc/base/unixfilesystem.h index e3710ec482..d6dfed547b 100644 --- a/webrtc/base/unixfilesystem.h +++ b/webrtc/base/unixfilesystem.h @@ -44,7 +44,7 @@ class UnixFilesystem : public FilesystemInterface { bool DeleteFile(const Pathname& filename) override; // This will attempt to delete the folder located at 'folder' - // It ASSERTs and returns false if you pass it a non-existant folder or a + // It DCHECKs and returns false if you pass it a non-existant folder or a // plain file. bool DeleteEmptyFolder(const Pathname& folder) override; diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc index c23084eed1..a3c5832fd9 100644 --- a/webrtc/media/engine/webrtcvoiceengine.cc +++ b/webrtc/media/engine/webrtcvoiceengine.cc @@ -496,7 +496,7 @@ class WebRtcVoiceCodecs final { // codec. static void MaybeFixupG722(webrtc::CodecInst* voe_codec, int new_plfreq) { if (IsCodec(*voe_codec, kG722CodecName)) { - // If the ASSERT triggers, the codec definition in WebRTC VoiceEngine + // If the DCHECK triggers, the codec definition in WebRTC VoiceEngine // has changed, and this special case is no longer needed. RTC_DCHECK(voe_codec->plfreq != new_plfreq); voe_codec->plfreq = new_plfreq; diff --git a/webrtc/modules/video_capture/windows/sink_filter_ds.cc b/webrtc/modules/video_capture/windows/sink_filter_ds.cc index 1c5dd3afe0..22171d7876 100644 --- a/webrtc/modules/video_capture/windows/sink_filter_ds.cc +++ b/webrtc/modules/video_capture/windows/sink_filter_ds.cc @@ -319,8 +319,8 @@ CaptureInputPin::Receive ( IN IMediaSample * pIMediaSample ) { HRESULT hr = S_OK; - ASSERT (m_pFilter); - ASSERT (pIMediaSample); + RTC_DCHECK(m_pFilter); + RTC_DCHECK(pIMediaSample); // get the thread handle of the delivering thread inc its priority if( _threadHandle == NULL)