diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-27 12:26:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-27 12:26:01 -0700 |
commit | 43854a5073602a4613131aa6dbac5f7b9a095bcd (patch) | |
tree | 653ebf0cd690e13d1ca9e315ffeb34f8ac85cfbb /xfa/fxfa/app/xfa_ffwidgetacc.cpp | |
parent | b2f6f9158f54cee1825830c7ed57fe9d89cff26e (diff) | |
download | pdfium-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/fxfa/app/xfa_ffwidgetacc.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_ffwidgetacc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp index 561db255d8..ad8cabad3a 100644 --- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp +++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp @@ -293,7 +293,7 @@ void CXFA_WidgetAcc::SetImageEdit(const CFX_WideStringC& wsContentType, pHrefNode->SetCData(XFA_ATTRIBUTE_Value, wsHref); } else { CFDE_XMLNode* pXMLNode = pBind->GetXMLMappingNode(); - FXSYS_assert(pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element); + ASSERT(pXMLNode && pXMLNode->GetType() == FDE_XMLNODE_Element); static_cast<CFDE_XMLElement*>(pXMLNode) ->SetString(FX_WSTRC(L"href"), wsHref); } @@ -647,7 +647,7 @@ int32_t CXFA_WidgetAcc::ExecuteScript(CXFA_Script script, static const uint32_t MAX_RECURSION_DEPTH = 2; if (m_nRecursionDepth > MAX_RECURSION_DEPTH) return XFA_EVENTERROR_Success; - FXSYS_assert(pEventParam); + ASSERT(pEventParam); if (!script) { return XFA_EVENTERROR_NotExist; } @@ -1596,7 +1596,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) { } else if (m_eType == XFA_TEXTPROVIDERTYPE_Datasets) { CXFA_Node* pBind = m_pWidgetAcc->GetDatasets(); CFDE_XMLNode* pXMLNode = pBind->GetXMLMappingNode(); - FXSYS_assert(pXMLNode); + ASSERT(pXMLNode); for (CFDE_XMLNode* pXMLChild = pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild); pXMLChild; |