summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec
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 /core/fxcodec/codec
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>
Diffstat (limited to 'core/fxcodec/codec')
-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
3 files changed, 10 insertions, 7 deletions
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: {