From 43854a5073602a4613131aa6dbac5f7b9a095bcd Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 27 Apr 2016 12:26:00 -0700 Subject: Standardize on ASSERT. There are currently three ways to assert in the code (ASSERT, FXSYS_assert and assert). This CL standardizes on ASSERT. The benefit of ASSERT is that it can be overridden if the platform requies and we can pickup the Chromium version if it has already been defined in the build. This does change behaviour. Currently FXSYS_assert is always defined but ASSERT is only defined in debug builds. So, the FXSYS_assert's would fire in Release builds. That will no longer happen. BUG=pdfium:219 Review-Url: https://codereview.chromium.org/1914303003 --- core/fxcodec/codec/fx_codec.cpp | 4 ++-- core/fxcodec/codec/fx_codec_jpeg.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fxcodec/codec') diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp index a0356929a5..f0f03ab0e9 100644 --- a/core/fxcodec/codec/fx_codec.cpp +++ b/core/fxcodec/codec/fx_codec.cpp @@ -375,7 +375,7 @@ void CCodec_RLScanlineDecoder::UpdateOperator(uint8_t used_bytes) { return; } if (m_Operator < 128) { - FXSYS_assert((uint32_t)m_Operator + 1 >= used_bytes); + ASSERT((uint32_t)m_Operator + 1 >= used_bytes); if (used_bytes == m_Operator + 1) { m_SrcOffset += used_bytes; GetNextOperator(); @@ -389,7 +389,7 @@ void CCodec_RLScanlineDecoder::UpdateOperator(uint8_t used_bytes) { return; } uint8_t count = 257 - m_Operator; - FXSYS_assert((uint32_t)count >= used_bytes); + ASSERT((uint32_t)count >= used_bytes); if (used_bytes == count) { m_SrcOffset++; GetNextOperator(); diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index 608bf52969..ebe6106945 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -457,7 +457,7 @@ FX_BOOL CCodec_JpegDecoder::v_Rewind() { return FALSE; } if ((int)cinfo.output_width > m_OrigWidth) { - FXSYS_assert(FALSE); + ASSERT(FALSE); return FALSE; } m_bStarted = TRUE; -- cgit v1.2.3