summaryrefslogtreecommitdiff
path: root/xfa
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 /xfa
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 'xfa')
-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
10 files changed, 28 insertions, 18 deletions
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;