summaryrefslogtreecommitdiff
path: root/xfa/fgas/xml/fgas_sax_imp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-27 12:26:00 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-27 12:26:01 -0700
commit43854a5073602a4613131aa6dbac5f7b9a095bcd (patch)
tree653ebf0cd690e13d1ca9e315ffeb34f8ac85cfbb /xfa/fgas/xml/fgas_sax_imp.cpp
parentb2f6f9158f54cee1825830c7ed57fe9d89cff26e (diff)
downloadpdfium-43854a5073602a4613131aa6dbac5f7b9a095bcd.tar.xz
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
Diffstat (limited to 'xfa/fgas/xml/fgas_sax_imp.cpp')
-rw-r--r--xfa/fgas/xml/fgas_sax_imp.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/xfa/fgas/xml/fgas_sax_imp.cpp b/xfa/fgas/xml/fgas_sax_imp.cpp
index ea3dafff59..d47bc44000 100644
--- a/xfa/fgas/xml/fgas_sax_imp.cpp
+++ b/xfa/fgas/xml/fgas_sax_imp.cpp
@@ -28,7 +28,7 @@ CFX_SAXFile::CFX_SAXFile()
FX_BOOL CFX_SAXFile::StartFile(IFX_FileRead* pFile,
uint32_t dwStart,
uint32_t dwLen) {
- FXSYS_assert(m_pFile == NULL && pFile != NULL);
+ ASSERT(m_pFile == NULL && pFile != NULL);
uint32_t dwSize = pFile->GetSize();
if (dwStart >= dwSize) {
return FALSE;
@@ -52,7 +52,7 @@ FX_BOOL CFX_SAXFile::StartFile(IFX_FileRead* pFile,
return TRUE;
}
FX_BOOL CFX_SAXFile::ReadNextBlock() {
- FXSYS_assert(m_pFile != NULL);
+ ASSERT(m_pFile != NULL);
uint32_t dwSize = m_dwEnd - m_dwCur;
if (dwSize == 0) {
return FALSE;
@@ -558,7 +558,7 @@ void CFX_SAXReader::SkipNode() {
return;
}
iLen--;
- FXSYS_assert(iLen > -1);
+ ASSERT(iLen > -1);
m_SkipStack.RemoveAt(iLen, 1);
m_SkipChar = iLen ? m_SkipStack[iLen - 1] : 0;
return;
@@ -619,7 +619,7 @@ void CFX_SAXReader::SkipNode() {
}
}
void CFX_SAXReader::NotifyData() {
- FXSYS_assert(m_pHandler != NULL);
+ ASSERT(m_pHandler != NULL);
if (m_pCurItem->m_eNode == FX_SAXNODE_Tag)
m_pHandler->OnTagData(m_pCurItem->m_pNode,
m_bCharData ? FX_SAXNODE_CharData : FX_SAXNODE_Text,
@@ -627,7 +627,7 @@ void CFX_SAXReader::NotifyData() {
m_File.m_dwCur + m_dwDataOffset);
}
void CFX_SAXReader::NotifyEnter() {
- FXSYS_assert(m_pHandler != NULL);
+ ASSERT(m_pHandler != NULL);
if (m_pCurItem->m_eNode == FX_SAXNODE_Tag ||
m_pCurItem->m_eNode == FX_SAXNODE_Instruction) {
m_pCurItem->m_pNode =
@@ -636,7 +636,7 @@ void CFX_SAXReader::NotifyEnter() {
}
}
void CFX_SAXReader::NotifyAttribute() {
- FXSYS_assert(m_pHandler != NULL);
+ ASSERT(m_pHandler != NULL);
if (m_pCurItem->m_eNode == FX_SAXNODE_Tag ||
m_pCurItem->m_eNode == FX_SAXNODE_Instruction) {
m_pHandler->OnTagAttribute(m_pCurItem->m_pNode,
@@ -645,20 +645,20 @@ void CFX_SAXReader::NotifyAttribute() {
}
}
void CFX_SAXReader::NotifyBreak() {
- FXSYS_assert(m_pHandler != NULL);
+ ASSERT(m_pHandler != NULL);
if (m_pCurItem->m_eNode == FX_SAXNODE_Tag) {
m_pHandler->OnTagBreak(m_pCurItem->m_pNode);
}
}
void CFX_SAXReader::NotifyClose() {
- FXSYS_assert(m_pHandler != NULL);
+ ASSERT(m_pHandler != NULL);
if (m_pCurItem->m_eNode == FX_SAXNODE_Tag ||
m_pCurItem->m_eNode == FX_SAXNODE_Instruction) {
m_pHandler->OnTagClose(m_pCurItem->m_pNode, m_dwNodePos);
}
}
void CFX_SAXReader::NotifyEnd() {
- FXSYS_assert(m_pHandler != NULL);
+ ASSERT(m_pHandler != NULL);
if (m_pCurItem->m_eNode == FX_SAXNODE_Tag) {
m_pHandler->OnTagEnd(m_pCurItem->m_pNode,
CFX_ByteStringC(m_pszData, m_iDataLength),
@@ -666,7 +666,7 @@ void CFX_SAXReader::NotifyEnd() {
}
}
void CFX_SAXReader::NotifyTargetData() {
- FXSYS_assert(m_pHandler != NULL);
+ ASSERT(m_pHandler != NULL);
if (m_pCurItem->m_eNode == FX_SAXNODE_Instruction) {
m_pHandler->OnTargetData(m_pCurItem->m_pNode, m_pCurItem->m_eNode,
CFX_ByteStringC(m_pszName, m_iNameLength),