summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-22 17:05:40 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-23 00:18:13 +0000
commitb45324bfb414acc595e478dc7dc63ac43c792580 (patch)
tree90af2bb4c6386b2b2825c80d7405dace0416c69b
parent4cb82ee95256f110489f2b503e70729c44419e74 (diff)
downloadpdfium-b45324bfb414acc595e478dc7dc63ac43c792580.tar.xz
Use NOTREACHED() in more places.
Change-Id: I88466943171f19259f84add69679741d44c8e123 Reviewed-on: https://pdfium-review.googlesource.com/5551 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
-rw-r--r--core/fpdfapi/font/cpdf_font.cpp3
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.cpp3
-rw-r--r--core/fpdfapi/page/fpdf_page_colors.cpp9
-rw-r--r--core/fpdfapi/page/fpdf_page_func.cpp5
-rw-r--r--core/fpdfapi/parser/cpdf_array.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_object.cpp3
-rw-r--r--core/fpdfapi/parser/fpdf_parser_utility.cpp3
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp3
-rw-r--r--core/fpdfdoc/cpvt_fontmap.cpp7
-rw-r--r--core/fxcodec/codec/ccodec_tiffmodule.cpp3
-rw-r--r--core/fxcodec/codec/fx_codec_jpeg.cpp3
-rw-r--r--core/fxcodec/codec/fx_codec_progress.cpp11
-rw-r--r--core/fxge/dib/cfx_dibsource.cpp3
-rw-r--r--core/fxge/ge/cfx_cliprgn.cpp3
-rw-r--r--core/fxge/skia/fx_skia_device.cpp15
-rw-r--r--fpdfsdk/fpdfeditpage.cpp3
-rw-r--r--fpdfsdk/fsdk_actionhandler.cpp7
-rw-r--r--fpdfsdk/pdfwindow/PWL_Edit.cpp2
-rw-r--r--fpdfsdk/pdfwindow/PWL_Wnd.cpp2
-rw-r--r--xfa/fde/cfde_rendercontext.cpp3
-rw-r--r--xfa/fde/css/cfde_cssdeclaration.cpp3
-rw-r--r--xfa/fde/css/cfde_cssstyleselector.cpp3
-rw-r--r--xfa/fde/css/cfde_csssyntaxparser.cpp3
-rw-r--r--xfa/fxfa/cxfa_fileread.cpp7
-rw-r--r--xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp9
-rw-r--r--xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp3
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp7
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.cpp3
-rw-r--r--xfa/fxfa/parser/xfa_document_datamerger_imp.cpp5
29 files changed, 80 insertions, 56 deletions
diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp
index 193ee4a331..1a7fb60b0b 100644
--- a/core/fpdfapi/font/cpdf_font.cpp
+++ b/core/fpdfapi/font/cpdf_font.cpp
@@ -25,6 +25,7 @@
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fxcrt/fx_memory.h"
#include "core/fxge/fx_freetype.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
@@ -434,7 +435,7 @@ const char* CPDF_Font::GetAdobeCharName(
const std::vector<CFX_ByteString>& charnames,
int charcode) {
if (charcode < 0 || charcode >= 256) {
- ASSERT(false);
+ NOTREACHED();
return nullptr;
}
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index a5af1dbee0..e8594b927b 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -36,6 +36,7 @@
#include "core/fpdfapi/parser/fpdf_parser_decode.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxge/cfx_graphstatedata.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
namespace {
@@ -389,7 +390,7 @@ CPDF_Object* CPDF_StreamContentParser::GetObject(uint32_t index) {
if (param.m_Type == ContentParam::OBJECT)
return param.m_pObject.get();
- ASSERT(false);
+ NOTREACHED();
return nullptr;
}
diff --git a/core/fpdfapi/page/fpdf_page_colors.cpp b/core/fpdfapi/page/fpdf_page_colors.cpp
index 3ba833f1ef..1526b75041 100644
--- a/core/fpdfapi/page/fpdf_page_colors.cpp
+++ b/core/fpdfapi/page/fpdf_page_colors.cpp
@@ -18,6 +18,7 @@
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fxcodec/fx_codec.h"
+#include "third_party/base/logging.h"
#include "third_party/base/stl_util.h"
namespace {
@@ -105,7 +106,7 @@ bool CPDF_DeviceCS::GetRGB(float* pBuf, float* R, float* G, float* B) const {
}
return true;
default:
- ASSERT(false);
+ NOTREACHED();
return false;
}
}
@@ -141,7 +142,7 @@ bool CPDF_DeviceCS::SetRGB(float* pBuf, float R, float G, float B) const {
sRGB_to_AdobeCMYK(R, G, B, pBuf[0], pBuf[1], pBuf[2], pBuf[3]);
return true;
default:
- ASSERT(false);
+ NOTREACHED();
return false;
}
}
@@ -164,7 +165,7 @@ bool CPDF_DeviceCS::v_SetCMYK(float* pBuf,
pBuf[3] = k;
return true;
default:
- ASSERT(false);
+ NOTREACHED();
return false;
}
}
@@ -213,7 +214,7 @@ void CPDF_DeviceCS::TranslateImageLine(uint8_t* pDestBuf,
}
break;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
}
diff --git a/core/fpdfapi/page/fpdf_page_func.cpp b/core/fpdfapi/page/fpdf_page_func.cpp
index bc66adf726..48cd41c090 100644
--- a/core/fpdfapi/page/fpdf_page_func.cpp
+++ b/core/fpdfapi/page/fpdf_page_func.cpp
@@ -20,6 +20,7 @@
#include "core/fpdfapi/parser/cpdf_stream.h"
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
#include "core/fxcrt/fx_safe_types.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
@@ -127,13 +128,13 @@ class CPDF_PSOP {
if (m_op == PSOP_CONST)
return m_value;
- ASSERT(false);
+ NOTREACHED();
return 0;
}
CPDF_PSProc* GetProc() const {
if (m_op == PSOP_PROC)
return m_proc.get();
- ASSERT(false);
+ NOTREACHED();
return nullptr;
}
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp
index 698cd6d0d0..4caad10631 100644
--- a/core/fpdfapi/parser/cpdf_array.cpp
+++ b/core/fpdfapi/parser/cpdf_array.cpp
@@ -162,7 +162,7 @@ CPDF_Object* CPDF_Array::SetAt(size_t i, std::unique_ptr<CPDF_Object> pObj) {
ASSERT(IsArray());
ASSERT(!pObj || pObj->IsInline());
if (i >= m_Objects.size()) {
- ASSERT(false);
+ NOTREACHED();
return nullptr;
}
CPDF_Object* pRet = pObj.get();
diff --git a/core/fpdfapi/parser/cpdf_object.cpp b/core/fpdfapi/parser/cpdf_object.cpp
index f0ff81eeed..82c3b09416 100644
--- a/core/fpdfapi/parser/cpdf_object.cpp
+++ b/core/fpdfapi/parser/cpdf_object.cpp
@@ -14,6 +14,7 @@
#include "core/fpdfapi/parser/cpdf_parser.h"
#include "core/fpdfapi/parser/fpdf_parser_decode.h"
#include "core/fxcrt/fx_string.h"
+#include "third_party/base/logging.h"
#include "third_party/base/stl_util.h"
CPDF_Object::~CPDF_Object() {}
@@ -59,7 +60,7 @@ CPDF_Dictionary* CPDF_Object::GetDict() const {
}
void CPDF_Object::SetString(const CFX_ByteString& str) {
- ASSERT(false);
+ NOTREACHED();
}
bool CPDF_Object::IsArray() const {
diff --git a/core/fpdfapi/parser/fpdf_parser_utility.cpp b/core/fpdfapi/parser/fpdf_parser_utility.cpp
index af109e35aa..0cd4ca9225 100644
--- a/core/fpdfapi/parser/fpdf_parser_utility.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_utility.cpp
@@ -16,6 +16,7 @@
#include "core/fpdfapi/parser/cpdf_string.h"
#include "core/fpdfapi/parser/fpdf_parser_decode.h"
#include "core/fxcrt/fx_extension.h"
+#include "third_party/base/logging.h"
// Indexed by 8-bit character code, contains either:
// 'W' - for whitespace: NUL, TAB, CR, LF, FF, SPACE, 0x80, 0xff
@@ -215,7 +216,7 @@ CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj) {
break;
}
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
return buf;
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index e6b01eff3b..9f4bda1409 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -53,6 +53,7 @@
#include "core/fxge/cfx_pathdata.h"
#include "core/fxge/cfx_renderdevice.h"
#include "core/fxge/ifx_renderdevicedriver.h"
+#include "third_party/base/logging.h"
#include "third_party/base/numerics/safe_math.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
@@ -1733,7 +1734,7 @@ bool CPDF_RenderStatus::ProcessText(CPDF_TextObject* textobj,
case TextRenderingMode::MODE_INVISIBLE:
// Already handled above, but the compiler is not smart enough to
// realize it. Fall through.
- ASSERT(false);
+ NOTREACHED();
case TextRenderingMode::MODE_CLIP:
return true;
}
diff --git a/core/fpdfdoc/cpvt_fontmap.cpp b/core/fpdfdoc/cpvt_fontmap.cpp
index 42774d43d2..c6e1a85dae 100644
--- a/core/fpdfdoc/cpvt_fontmap.cpp
+++ b/core/fpdfdoc/cpvt_fontmap.cpp
@@ -12,6 +12,7 @@
#include "core/fpdfapi/parser/cpdf_reference.h"
#include "core/fpdfdoc/cpdf_interform.h"
#include "core/fxcrt/fx_codepage.h"
+#include "third_party/base/logging.h"
CPVT_FontMap::CPVT_FontMap(CPDF_Document* pDoc,
CPDF_Dictionary* pResDict,
@@ -78,16 +79,16 @@ CFX_ByteString CPVT_FontMap::GetPDFFontAlias(int32_t nFontIndex) {
int32_t CPVT_FontMap::GetWordFontIndex(uint16_t word,
int32_t charset,
int32_t nFontIndex) {
- ASSERT(false);
+ NOTREACHED();
return 0;
}
int32_t CPVT_FontMap::CharCodeFromUnicode(int32_t nFontIndex, uint16_t word) {
- ASSERT(false);
+ NOTREACHED();
return 0;
}
int32_t CPVT_FontMap::CharSetFromUnicode(uint16_t word, int32_t nOldCharset) {
- ASSERT(false);
+ NOTREACHED();
return FX_CHARSET_ANSI;
}
diff --git a/core/fxcodec/codec/ccodec_tiffmodule.cpp b/core/fxcodec/codec/ccodec_tiffmodule.cpp
index 09eddf6076..6ead576ce8 100644
--- a/core/fxcodec/codec/ccodec_tiffmodule.cpp
+++ b/core/fxcodec/codec/ccodec_tiffmodule.cpp
@@ -14,6 +14,7 @@
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/fx_dib.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
extern "C" {
@@ -119,7 +120,7 @@ tsize_t tiff_read(thandle_t context, tdata_t buf, tsize_t length) {
}
tsize_t tiff_write(thandle_t context, tdata_t buf, tsize_t length) {
- ASSERT(false);
+ NOTREACHED();
return 0;
}
diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp
index 907d15f3fb..2211e79522 100644
--- a/core/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/fxcodec/codec/fx_codec_jpeg.cpp
@@ -14,6 +14,7 @@
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxge/dib/cfx_dibsource.h"
#include "core/fxge/fx_dib.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
extern "C" {
@@ -297,7 +298,7 @@ bool CCodec_JpegDecoder::v_Rewind() {
return false;
}
if ((int)cinfo.output_width > m_OrigWidth) {
- ASSERT(false);
+ NOTREACHED();
return false;
}
m_bStarted = true;
diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp
index 84ab6a14c8..9e470f3f14 100644
--- a/core/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/fxcodec/codec/fx_codec_progress.cpp
@@ -12,6 +12,7 @@
#include "core/fxcodec/fx_codec.h"
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/fx_dib.h"
+#include "third_party/base/logging.h"
#include "third_party/base/numerics/safe_math.h"
#include "third_party/base/ptr_util.h"
@@ -380,7 +381,7 @@ bool CCodec_ProgressiveDecoder::PngReadHeader(int width,
switch (format) {
case FXDIB_1bppMask:
case FXDIB_1bppRgb:
- ASSERT(false);
+ NOTREACHED();
return false;
case FXDIB_8bppMask:
case FXDIB_8bppRgb:
@@ -394,7 +395,7 @@ bool CCodec_ProgressiveDecoder::PngReadHeader(int width,
*color_type = 6;
break;
default:
- ASSERT(false);
+ NOTREACHED();
return false;
}
*gamma = kPngGamma;
@@ -404,7 +405,7 @@ bool CCodec_ProgressiveDecoder::PngReadHeader(int width,
bool CCodec_ProgressiveDecoder::PngAskScanlineBuf(int line, uint8_t*& src_buf) {
CFX_RetainPtr<CFX_DIBitmap> pDIBitmap = m_pDeviceBitmap;
if (!pDIBitmap) {
- ASSERT(false);
+ NOTREACHED();
return false;
}
if (line >= m_clipBox.top && line < m_clipBox.bottom) {
@@ -427,7 +428,7 @@ bool CCodec_ProgressiveDecoder::PngAskScanlineBuf(int line, uint8_t*& src_buf) {
switch (pDIBitmap->GetFormat()) {
case FXDIB_1bppMask:
case FXDIB_1bppRgb:
- ASSERT(false);
+ NOTREACHED();
return false;
case FXDIB_8bppMask:
case FXDIB_8bppRgb: {
@@ -487,7 +488,7 @@ void CCodec_ProgressiveDecoder::PngOneOneMapResampleHorz(
switch (pDeviceBitmap->GetFormat()) {
case FXDIB_1bppMask:
case FXDIB_1bppRgb:
- ASSERT(false);
+ NOTREACHED();
return;
case FXDIB_8bppMask:
case FXDIB_8bppRgb: {
diff --git a/core/fxge/dib/cfx_dibsource.cpp b/core/fxge/dib/cfx_dibsource.cpp
index 547f01690c..deb8e15f49 100644
--- a/core/fxge/dib/cfx_dibsource.cpp
+++ b/core/fxge/dib/cfx_dibsource.cpp
@@ -17,6 +17,7 @@
#include "core/fxge/dib/cfx_imagestretcher.h"
#include "core/fxge/dib/cfx_imagetransformer.h"
#include "core/fxge/ge/cfx_cliprgn.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
namespace {
@@ -1136,7 +1137,7 @@ bool CFX_DIBSource::ConvertBuffer(
case FXDIB_1bppCmyk:
case FXDIB_1bppMask:
case FXDIB_1bppRgb:
- ASSERT(false);
+ NOTREACHED();
return false;
case FXDIB_8bppMask: {
if ((src_format & 0xff) == 1) {
diff --git a/core/fxge/ge/cfx_cliprgn.cpp b/core/fxge/ge/cfx_cliprgn.cpp
index d2f065dba7..e00cb7c3ad 100644
--- a/core/fxge/ge/cfx_cliprgn.cpp
+++ b/core/fxge/ge/cfx_cliprgn.cpp
@@ -9,6 +9,7 @@
#include <utility>
#include "core/fxge/dib/cfx_dibitmap.h"
+#include "third_party/base/logging.h"
CFX_ClipRgn::CFX_ClipRgn(int width, int height)
: m_Type(RectI), m_Box(0, 0, width, height) {}
@@ -101,5 +102,5 @@ void CFX_ClipRgn::IntersectMaskF(int left,
m_Mask = std::move(new_dib);
return;
}
- ASSERT(false);
+ NOTREACHED();
}
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index dd48045ce1..a1193fbe9b 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -22,13 +22,8 @@
#include "core/fxge/dib/cfx_imagerenderer.h"
#include "core/fxge/dib/cfx_imagestretcher.h"
#include "core/fxge/skia/fx_skia_device.h"
-
-#ifdef _SKIA_SUPPORT_PATHS_
-#include "core/fxge/ge/cfx_cliprgn.h"
-#endif // _SKIA_SUPPORT_PATHS_
-
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
-
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkClipOp.h"
#include "third_party/skia/include/core/SkImage.h"
@@ -41,6 +36,10 @@
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "third_party/skia/include/pathops/SkPathOps.h"
+#ifdef _SKIA_SUPPORT_PATHS_
+#include "core/fxge/ge/cfx_cliprgn.h"
+#endif // _SKIA_SUPPORT_PATHS_
+
#ifdef _SKIA_SUPPORT_
#include "third_party/skia/include/core/SkColorFilter.h"
#include "third_party/skia/include/core/SkColorPriv.h"
@@ -112,7 +111,7 @@ void RgbByteOrderTransferBitmap(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
}
}
} else {
- ASSERT(false);
+ NOTREACHED();
}
return;
}
@@ -147,7 +146,7 @@ void RgbByteOrderTransferBitmap(const CFX_RetainPtr<CFX_DIBitmap>& pBitmap,
return;
}
- ASSERT(false);
+ NOTREACHED();
}
#endif // _SKIA_SUPPORT_PATHS_
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index 95ae66685d..6ed375807f 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -26,6 +26,7 @@
#include "core/fpdfdoc/cpdf_annotlist.h"
#include "fpdfsdk/fsdk_define.h"
#include "public/fpdf_formfill.h"
+#include "third_party/base/logging.h"
#include "third_party/base/stl_util.h"
#ifdef PDF_ENABLE_XFA
@@ -170,7 +171,7 @@ DLLEXPORT void STDCALL FPDFPage_InsertObject(FPDF_PAGE page,
break;
}
default: {
- ASSERT(false);
+ NOTREACHED();
break;
}
}
diff --git a/fpdfsdk/fsdk_actionhandler.cpp b/fpdfsdk/fsdk_actionhandler.cpp
index 16724d5ac4..776a1714cd 100644
--- a/fpdfsdk/fsdk_actionhandler.cpp
+++ b/fpdfsdk/fsdk_actionhandler.cpp
@@ -17,6 +17,7 @@
#include "fpdfsdk/fsdk_define.h"
#include "fpdfsdk/javascript/ijs_event_context.h"
#include "fpdfsdk/javascript/ijs_runtime.h"
+#include "third_party/base/logging.h"
#include "third_party/base/stl_util.h"
bool CPDFSDK_ActionHandler::DoAction_DocOpen(
@@ -387,7 +388,7 @@ void CPDFSDK_ActionHandler::DoAction_NoJs(
DoAction_ImportData(action, pFormFillEnv);
break;
case CPDF_Action::JavaScript:
- ASSERT(false);
+ NOTREACHED();
break;
case CPDF_Action::SetOCGState:
DoAction_SetOCGState(pFormFillEnv, action);
@@ -504,7 +505,7 @@ void CPDFSDK_ActionHandler::RunFieldJavaScript(
data.sValue, data.bRC);
break;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
@@ -567,7 +568,7 @@ void CPDFSDK_ActionHandler::RunDocumentPageJavaScript(
pContext->OnPage_OutView(pFormFillEnv);
break;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
index 4e37e9bde4..2b78824711 100644
--- a/fpdfsdk/pdfwindow/PWL_Edit.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp
@@ -33,7 +33,7 @@ CPWL_Edit::CPWL_Edit()
: m_pFillerNotify(nullptr), m_bFocus(false), m_pFormFiller(nullptr) {}
CPWL_Edit::~CPWL_Edit() {
- ASSERT(m_bFocus == false);
+ ASSERT(!m_bFocus);
}
CFX_ByteString CPWL_Edit::GetClassName() const {
diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
index 075b74651b..5523c59317 100644
--- a/fpdfsdk/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
@@ -195,7 +195,7 @@ CPWL_Wnd::CPWL_Wnd()
m_bEnabled(true) {}
CPWL_Wnd::~CPWL_Wnd() {
- ASSERT(m_bCreated == false);
+ ASSERT(!m_bCreated);
}
CFX_ByteString CPWL_Wnd::GetClassName() const {
diff --git a/xfa/fde/cfde_rendercontext.cpp b/xfa/fde/cfde_rendercontext.cpp
index af90ff7f13..702f7ce295 100644
--- a/xfa/fde/cfde_rendercontext.cpp
+++ b/xfa/fde/cfde_rendercontext.cpp
@@ -6,6 +6,7 @@
#include "xfa/fde/cfde_rendercontext.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
#include "xfa/fde/cfde_brush.h"
#include "xfa/fde/cfde_renderdevice.h"
@@ -64,7 +65,7 @@ void CFDE_RenderContext::DoRender() {
iCount += 5;
break;
case FDE_VISUALOBJ_Canvas:
- ASSERT(false);
+ NOTREACHED();
break;
default:
break;
diff --git a/xfa/fde/css/cfde_cssdeclaration.cpp b/xfa/fde/css/cfde_cssdeclaration.cpp
index 4179e61f5d..00a2c9e33c 100644
--- a/xfa/fde/css/cfde_cssdeclaration.cpp
+++ b/xfa/fde/css/cfde_cssdeclaration.cpp
@@ -7,6 +7,7 @@
#include "xfa/fde/css/cfde_cssdeclaration.h"
#include "core/fxcrt/fx_extension.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
#include "xfa/fde/css/cfde_csscolorvalue.h"
#include "xfa/fde/css/cfde_csscustomproperty.h"
@@ -265,7 +266,7 @@ void CFDE_CSSDeclaration::AddProperty(const FDE_CSSPropertyTable* pTable,
ParseValueListProperty(pTable, pszValue, iValueLen, bImportant);
return;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
}
diff --git a/xfa/fde/css/cfde_cssstyleselector.cpp b/xfa/fde/css/cfde_cssstyleselector.cpp
index 42cc7afc23..024c8a86e2 100644
--- a/xfa/fde/css/cfde_cssstyleselector.cpp
+++ b/xfa/fde/css/cfde_cssstyleselector.cpp
@@ -9,6 +9,7 @@
#include <algorithm>
#include <utility>
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
#include "xfa/fde/css/cfde_csscolorvalue.h"
#include "xfa/fde/css/cfde_csscomputedstyle.h"
@@ -412,7 +413,7 @@ void CFDE_CSSStyleSelector::ApplyProperty(
}
}
} else {
- ASSERT(false);
+ NOTREACHED();
}
}
diff --git a/xfa/fde/css/cfde_csssyntaxparser.cpp b/xfa/fde/css/cfde_csssyntaxparser.cpp
index bc861bdd6e..e943f29f4d 100644
--- a/xfa/fde/css/cfde_csssyntaxparser.cpp
+++ b/xfa/fde/css/cfde_csssyntaxparser.cpp
@@ -10,6 +10,7 @@
#include "core/fxcrt/fx_codepage.h"
#include "core/fxcrt/fx_extension.h"
+#include "third_party/base/logging.h"
#include "xfa/fde/css/cfde_cssdeclaration.h"
#include "xfa/fde/css/fde_cssdatatable.h"
@@ -182,7 +183,7 @@ FDE_CSSSyntaxStatus CFDE_CSSSyntaxParser::DoSyntaxParse() {
m_TextPlane.MoveNext();
break;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
}
diff --git a/xfa/fxfa/cxfa_fileread.cpp b/xfa/fxfa/cxfa_fileread.cpp
index acd81a2232..12e23646d1 100644
--- a/xfa/fxfa/cxfa_fileread.cpp
+++ b/xfa/fxfa/cxfa_fileread.cpp
@@ -9,6 +9,7 @@
#include <algorithm>
#include "core/fpdfapi/parser/cpdf_stream_acc.h"
+#include "third_party/base/logging.h"
#include "third_party/base/stl_util.h"
CXFA_FileRead::CXFA_FileRead(const std::vector<CPDF_Stream*>& streams) {
@@ -56,7 +57,7 @@ bool CXFA_FileRead::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) {
}
size_t CXFA_FileRead::ReadBlock(void* buffer, size_t size) {
- ASSERT(false);
+ NOTREACHED();
return 0;
}
@@ -69,13 +70,13 @@ bool CXFA_FileRead::IsEOF() {
}
bool CXFA_FileRead::Flush() {
- ASSERT(false);
+ NOTREACHED();
return false;
}
bool CXFA_FileRead::WriteBlock(const void* pData,
FX_FILESIZE offset,
size_t size) {
- ASSERT(false);
+ NOTREACHED();
return false;
}
diff --git a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp
index fdcb200a2b..1305126554 100644
--- a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp
+++ b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp
@@ -9,6 +9,7 @@
#include <utility>
#include "core/fxcrt/fx_extension.h"
+#include "third_party/base/logging.h"
namespace {
@@ -368,7 +369,7 @@ bool CXFA_FMEqualityExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[NOTEQUALITY];
break;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
javascript << L"(";
@@ -407,7 +408,7 @@ bool CXFA_FMRelationalExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[GREATEREQUAL];
break;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
javascript << L"(";
@@ -436,7 +437,7 @@ bool CXFA_FMAdditiveExpression::ToJavaScript(CFX_WideTextBuf& javascript) {
javascript << gs_lpStrExpFuncName[MINUS];
break;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
javascript << L"(";
@@ -466,7 +467,7 @@ bool CXFA_FMMultiplicativeExpression::ToJavaScript(
javascript << gs_lpStrExpFuncName[DIVIDE];
break;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
javascript << L"(";
diff --git a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
index 8911227f3d..b2e4e725a7 100644
--- a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
@@ -11,6 +11,7 @@
#include <utility>
#include <vector>
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
#include "xfa/fxfa/app/xfa_ffnotify.h"
@@ -73,7 +74,7 @@ void UpdateWidgetSize(CXFA_ContentLayoutItem* pLayoutItem,
break;
}
default:
- ASSERT(false);
+ NOTREACHED();
}
}
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 8830f3412c..3c254ef6fc 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -20,6 +20,7 @@
#include "core/fxcrt/xml/cfx_xmlnode.h"
#include "core/fxcrt/xml/cfx_xmltext.h"
#include "fxjs/cfxjse_value.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
#include "xfa/fxfa/app/xfa_ffnotify.h"
@@ -3174,7 +3175,7 @@ int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired) {
continue;
}
if (pRemoveInstance->GetElementType() == XFA_Element::InstanceManager) {
- ASSERT(false);
+ NOTREACHED();
break;
}
if (pRemoveInstance->GetNameHash() == dInstanceNameHash) {
@@ -4460,7 +4461,7 @@ int32_t CXFA_Node::InsertChild(int32_t index, CXFA_Node* pNode) {
bool CXFA_Node::InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode) {
if (!pNode || pNode->m_pParent ||
(pBeforeNode && pBeforeNode->m_pParent != this)) {
- ASSERT(false);
+ NOTREACHED();
return false;
}
bool ret = m_pDocument->RemovePurgeNode(pNode);
@@ -4519,7 +4520,7 @@ CXFA_Node* CXFA_Node::Deprecated_GetPrevSibling() {
bool CXFA_Node::RemoveChild(CXFA_Node* pNode, bool bNotify) {
if (!pNode || pNode->m_pParent != this) {
- ASSERT(false);
+ NOTREACHED();
return false;
}
if (m_pChild == pNode) {
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index 3cbcd26100..1b5cccf101 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -20,6 +20,7 @@
#include "core/fxcrt/xml/cfx_xmlnode.h"
#include "core/fxcrt/xml/cfx_xmlparser.h"
#include "core/fxcrt/xml/cfx_xmltext.h"
+#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
#include "xfa/fxfa/fxfa.h"
#include "xfa/fxfa/parser/cxfa_document.h"
@@ -221,7 +222,7 @@ void ConvertXMLToPlainText(CFX_XMLElement* pRootXMLNode,
break;
}
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
}
diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
index ab6f155ae5..d4cd058b44 100644
--- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp
@@ -12,6 +12,7 @@
#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/xml/cfx_xmlelement.h"
#include "core/fxcrt/xml/cfx_xmlnode.h"
+#include "third_party/base/logging.h"
#include "third_party/base/stl_util.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_layoutprocessor.h"
@@ -110,7 +111,7 @@ bool FormValueNode_SetChildContent(CXFA_Node* pValueNode,
break;
}
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
return true;
@@ -1322,7 +1323,7 @@ CXFA_Node* CXFA_Document::DataMerge_CopyContainer(CXFA_Node* pTemplateNode,
case XFA_Element::Variables:
break;
default:
- ASSERT(false);
+ NOTREACHED();
break;
}
return nullptr;