Replace ASSERT() with DCHECK() in xfa/fxfa. Bug: pdfium:1596 Change-Id: I06bdda93cef91b66b98f8ec1e4baafd746e1b073 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/74390 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fxfa/cxfa_ffbarcode.cpp b/xfa/fxfa/cxfa_ffbarcode.cpp index 32811e7d..72b2f08 100644 --- a/xfa/fxfa/cxfa_ffbarcode.cpp +++ b/xfa/fxfa/cxfa_ffbarcode.cpp
@@ -9,6 +9,7 @@ #include <utility> #include "core/fxcrt/fx_extension.h" +#include "third_party/base/check.h" #include "xfa/fwl/cfwl_app.h" #include "xfa/fwl/cfwl_barcode.h" #include "xfa/fwl/cfwl_notedriver.h" @@ -143,7 +144,7 @@ } bool CXFA_FFBarcode::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); CFWL_Barcode* pFWLBarcode = cppgc::MakeGarbageCollected<CFWL_Barcode>( GetFWLApp()->GetHeap()->GetAllocationHandle(), GetFWLApp());
diff --git a/xfa/fxfa/cxfa_ffcheckbutton.cpp b/xfa/fxfa/cxfa_ffcheckbutton.cpp index 75eca3a..05319c6 100644 --- a/xfa/fxfa/cxfa_ffcheckbutton.cpp +++ b/xfa/fxfa/cxfa_ffcheckbutton.cpp
@@ -6,6 +6,7 @@ #include "xfa/fxfa/cxfa_ffcheckbutton.h" +#include "third_party/base/check.h" #include "v8/include/cppgc/visitor.h" #include "xfa/fwl/cfwl_checkbox.h" #include "xfa/fwl/cfwl_messagemouse.h" @@ -36,7 +37,7 @@ } bool CXFA_FFCheckButton::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); CFWL_CheckBox* pCheckBox = cppgc::MakeGarbageCollected<CFWL_CheckBox>( GetFWLApp()->GetHeap()->GetAllocationHandle(), GetFWLApp());
diff --git a/xfa/fxfa/cxfa_ffcombobox.cpp b/xfa/fxfa/cxfa_ffcombobox.cpp index 1e9feaa..23cdaf0 100644 --- a/xfa/fxfa/cxfa_ffcombobox.cpp +++ b/xfa/fxfa/cxfa_ffcombobox.cpp
@@ -9,6 +9,7 @@ #include <utility> #include <vector> +#include "third_party/base/check.h" #include "v8/include/cppgc/visitor.h" #include "xfa/fwl/cfwl_combobox.h" #include "xfa/fwl/cfwl_eventselectchanged.h" @@ -54,7 +55,7 @@ } bool CXFA_FFComboBox::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); CFWL_ComboBox* pComboBox = cppgc::MakeGarbageCollected<CFWL_ComboBox>( GetFWLApp()->GetHeap()->GetAllocationHandle(), GetFWLApp());
diff --git a/xfa/fxfa/cxfa_ffdatetimeedit.cpp b/xfa/fxfa/cxfa_ffdatetimeedit.cpp index bca9b88..ebd3861 100644 --- a/xfa/fxfa/cxfa_ffdatetimeedit.cpp +++ b/xfa/fxfa/cxfa_ffdatetimeedit.cpp
@@ -6,6 +6,7 @@ #include "xfa/fxfa/cxfa_ffdatetimeedit.h" +#include "third_party/base/check.h" #include "xfa/fwl/cfwl_datetimepicker.h" #include "xfa/fwl/cfwl_eventselectchanged.h" #include "xfa/fwl/cfwl_notedriver.h" @@ -39,7 +40,7 @@ } bool CXFA_FFDateTimeEdit::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); CFWL_DateTimePicker* pWidget = cppgc::MakeGarbageCollected<CFWL_DateTimePicker>(
diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp index 4ab61d6..54d17f7 100644 --- a/xfa/fxfa/cxfa_ffdoc.cpp +++ b/xfa/fxfa/cxfa_ffdoc.cpp
@@ -22,6 +22,7 @@ #include "core/fxcrt/xml/cfx_xmlparser.h" #include "core/fxge/dib/cfx_dibitmap.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "third_party/base/ptr_util.h" #include "v8/include/cppgc/allocation.h" #include "v8/include/cppgc/heap.h" @@ -309,7 +310,7 @@ bool CXFA_FFDoc::SavePackage(CXFA_Node* pNode, const RetainPtr<IFX_SeekableStream>& pFile) { - ASSERT(pNode || GetXFADoc()->GetRoot()); + DCHECK(pNode || GetXFADoc()->GetRoot()); CXFA_DataExporter exporter; return exporter.Export(pFile, pNode ? pNode : GetXFADoc()->GetRoot());
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp index 1c4d5f4..dd88653 100644 --- a/xfa/fxfa/cxfa_ffdocview.cpp +++ b/xfa/fxfa/cxfa_ffdocview.cpp
@@ -13,6 +13,7 @@ #include "fxjs/gc/container_trace.h" #include "fxjs/xfa/cfxjse_engine.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "third_party/base/stl_util.h" #include "xfa/fxfa/cxfa_ffapp.h" #include "xfa/fxfa/cxfa_ffbarcode.h" @@ -506,7 +507,7 @@ } void CXFA_FFDocView::AddIndexChangedSubform(CXFA_Node* pNode) { - ASSERT(pNode->GetElementType() == XFA_Element::Subform); + DCHECK(pNode->GetElementType() == XFA_Element::Subform); if (!pdfium::Contains(m_IndexChangedSubforms, pNode)) m_IndexChangedSubforms.push_back(pNode); }
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp index 6002cb8..8cb363c 100644 --- a/xfa/fxfa/cxfa_fffield.cpp +++ b/xfa/fxfa/cxfa_fffield.cpp
@@ -9,6 +9,7 @@ #include <algorithm> #include <utility> +#include "third_party/base/check.h" #include "third_party/base/stl_util.h" #include "xfa/fwl/cfwl_edit.h" #include "xfa/fwl/cfwl_eventmouse.h" @@ -711,7 +712,7 @@ } void CXFA_FFField::SendMessageToFWLWidget(CFWL_Message* pMessage) { - ASSERT(pMessage); + DCHECK(pMessage); GetApp()->GetFWLWidgetMgr()->OnProcessMessageToForm(pMessage); }
diff --git a/xfa/fxfa/cxfa_ffimageedit.cpp b/xfa/fxfa/cxfa_ffimageedit.cpp index a3d70fc..b70bc1a 100644 --- a/xfa/fxfa/cxfa_ffimageedit.cpp +++ b/xfa/fxfa/cxfa_ffimageedit.cpp
@@ -7,6 +7,7 @@ #include "xfa/fxfa/cxfa_ffimageedit.h" #include "core/fxge/dib/cfx_dibitmap.h" +#include "third_party/base/check.h" #include "v8/include/cppgc/visitor.h" #include "xfa/fwl/cfwl_app.h" #include "xfa/fwl/cfwl_messagemouse.h" @@ -37,7 +38,7 @@ } bool CXFA_FFImageEdit::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); CFWL_PictureBox* pPictureBox = cppgc::MakeGarbageCollected<CFWL_PictureBox>( GetFWLApp()->GetHeap()->GetAllocationHandle(), GetFWLApp());
diff --git a/xfa/fxfa/cxfa_fflistbox.cpp b/xfa/fxfa/cxfa_fflistbox.cpp index 039f389..9505063 100644 --- a/xfa/fxfa/cxfa_fflistbox.cpp +++ b/xfa/fxfa/cxfa_fflistbox.cpp
@@ -10,6 +10,7 @@ #include <utility> #include <vector> +#include "third_party/base/check.h" #include "third_party/base/stl_util.h" #include "v8/include/cppgc/visitor.h" #include "xfa/fwl/cfwl_listbox.h" @@ -45,7 +46,7 @@ } bool CXFA_FFListBox::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); CFWL_ListBox* pListBox = cppgc::MakeGarbageCollected<CFWL_ListBox>( GetFWLApp()->GetHeap()->GetAllocationHandle(), GetFWLApp(),
diff --git a/xfa/fxfa/cxfa_ffnotify.cpp b/xfa/fxfa/cxfa_ffnotify.cpp index be1ce9e..d5238c6 100644 --- a/xfa/fxfa/cxfa_ffnotify.cpp +++ b/xfa/fxfa/cxfa_ffnotify.cpp
@@ -8,6 +8,7 @@ #include <utility> +#include "third_party/base/check.h" #include "xfa/fxfa/cxfa_ffapp.h" #include "xfa/fxfa/cxfa_ffarc.h" #include "xfa/fxfa/cxfa_ffbarcode.h" @@ -93,8 +94,8 @@ } CXFA_FFWidget* CXFA_FFNotify::OnCreateContentLayoutItem(CXFA_Node* pNode) { - ASSERT(pNode->GetElementType() != XFA_Element::ContentArea); - ASSERT(pNode->GetElementType() != XFA_Element::PageArea); + DCHECK(pNode->GetElementType() != XFA_Element::ContentArea); + DCHECK(pNode->GetElementType() != XFA_Element::PageArea); // We only need to create the widget for certain types of objects. if (!pNode->HasCreatedUIWidget()) @@ -203,7 +204,6 @@ case XFA_FFWidgetType::kNone: return nullptr; } - ASSERT(pWidget); auto* pLayout = CXFA_LayoutProcessor::FromDocument(m_pDoc->GetXFADoc()); pWidget->SetDocView(m_pDoc->GetDocView(pLayout)); return pWidget;
diff --git a/xfa/fxfa/cxfa_ffnumericedit.cpp b/xfa/fxfa/cxfa_ffnumericedit.cpp index c350d34..8ab4cf9 100644 --- a/xfa/fxfa/cxfa_ffnumericedit.cpp +++ b/xfa/fxfa/cxfa_ffnumericedit.cpp
@@ -6,6 +6,7 @@ #include "xfa/fxfa/cxfa_ffnumericedit.h" +#include "third_party/base/check.h" #include "xfa/fwl/cfwl_edit.h" #include "xfa/fwl/cfwl_eventvalidate.h" #include "xfa/fwl/cfwl_notedriver.h" @@ -20,7 +21,7 @@ CXFA_FFNumericEdit::~CXFA_FFNumericEdit() = default; bool CXFA_FFNumericEdit::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); CFWL_Edit* pWidget = cppgc::MakeGarbageCollected<CFWL_Edit>( GetFWLApp()->GetHeap()->GetAllocationHandle(), GetFWLApp(),
diff --git a/xfa/fxfa/cxfa_ffpageview.cpp b/xfa/fxfa/cxfa_ffpageview.cpp index 960c1ab..5133871 100644 --- a/xfa/fxfa/cxfa_ffpageview.cpp +++ b/xfa/fxfa/cxfa_ffpageview.cpp
@@ -12,6 +12,7 @@ #include "fxjs/gc/container_trace.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "third_party/base/stl_util.h" #include "xfa/fxfa/cxfa_ffcheckbutton.h" #include "xfa/fxfa/cxfa_ffdoc.h" @@ -30,8 +31,8 @@ CFX_Matrix GetPageMatrix(const CFX_RectF& docPageRect, const FX_RECT& devicePageRect, int32_t iRotate) { - ASSERT(iRotate >= 0); - ASSERT(iRotate <= 3); + DCHECK(iRotate >= 0); + DCHECK(iRotate <= 3); CFX_Matrix m; if (iRotate == 0 || iRotate == 2) {
diff --git a/xfa/fxfa/cxfa_ffpasswordedit.cpp b/xfa/fxfa/cxfa_ffpasswordedit.cpp index 5d68da1..1bf03a0 100644 --- a/xfa/fxfa/cxfa_ffpasswordedit.cpp +++ b/xfa/fxfa/cxfa_ffpasswordedit.cpp
@@ -6,6 +6,7 @@ #include "xfa/fxfa/cxfa_ffpasswordedit.h" +#include "third_party/base/check.h" #include "xfa/fwl/cfwl_edit.h" #include "xfa/fwl/cfwl_notedriver.h" #include "xfa/fxfa/cxfa_ffdoc.h" @@ -24,7 +25,7 @@ } bool CXFA_FFPasswordEdit::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); CFWL_Edit* pWidget = cppgc::MakeGarbageCollected<CFWL_Edit>( GetFWLApp()->GetHeap()->GetAllocationHandle(), GetFWLApp(),
diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp index c35360c..0078ff9 100644 --- a/xfa/fxfa/cxfa_ffpushbutton.cpp +++ b/xfa/fxfa/cxfa_ffpushbutton.cpp
@@ -6,6 +6,7 @@ #include "xfa/fxfa/cxfa_ffpushbutton.h" +#include "third_party/base/check.h" #include "v8/include/cppgc/visitor.h" #include "xfa/fwl/cfwl_notedriver.h" #include "xfa/fwl/cfwl_pushbutton.h" @@ -58,7 +59,7 @@ } bool CXFA_FFPushButton::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); CFWL_PushButton* pPushButton = cppgc::MakeGarbageCollected<CFWL_PushButton>( GetFWLApp()->GetHeap()->GetAllocationHandle(), GetFWLApp());
diff --git a/xfa/fxfa/cxfa_ffsignature.cpp b/xfa/fxfa/cxfa_ffsignature.cpp index 7360375..9487a7c 100644 --- a/xfa/fxfa/cxfa_ffsignature.cpp +++ b/xfa/fxfa/cxfa_ffsignature.cpp
@@ -6,6 +6,7 @@ #include "xfa/fxfa/cxfa_ffsignature.h" +#include "third_party/base/check.h" #include "xfa/fxfa/cxfa_ffdoc.h" #include "xfa/fxfa/cxfa_fffield.h" #include "xfa/fxfa/cxfa_ffpageview.h" @@ -17,7 +18,7 @@ CXFA_FFSignature::~CXFA_FFSignature() = default; bool CXFA_FFSignature::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); return CXFA_FFField::LoadWidget(); }
diff --git a/xfa/fxfa/cxfa_fftextedit.cpp b/xfa/fxfa/cxfa_fftextedit.cpp index c0c51b8..58b7f76 100644 --- a/xfa/fxfa/cxfa_fftextedit.cpp +++ b/xfa/fxfa/cxfa_fftextedit.cpp
@@ -9,6 +9,7 @@ #include <memory> #include <utility> +#include "third_party/base/check.h" #include "xfa/fwl/cfwl_datetimepicker.h" #include "xfa/fwl/cfwl_edit.h" #include "xfa/fwl/cfwl_eventtextwillchange.h" @@ -50,7 +51,7 @@ } bool CXFA_FFTextEdit::LoadWidget() { - ASSERT(!IsLoaded()); + DCHECK(!IsLoaded()); CFWL_Edit* pFWLEdit = cppgc::MakeGarbageCollected<CFWL_Edit>( GetFWLApp()->GetHeap()->GetAllocationHandle(), GetFWLApp(),
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp index 43cec04..84e7e62 100644 --- a/xfa/fxfa/cxfa_ffwidget.cpp +++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -18,6 +18,7 @@ #include "core/fxge/cfx_pathdata.h" #include "core/fxge/cfx_renderdevice.h" #include "core/fxge/dib/cfx_dibitmap.h" +#include "third_party/base/check.h" #include "xfa/fwl/fwl_widgethit.h" #include "xfa/fxfa/cxfa_eventparam.h" #include "xfa/fxfa/cxfa_ffapp.h" @@ -581,7 +582,7 @@ } void CXFA_FFWidget::GetBorderColorAndThickness(FX_ARGB* cr, float* fWidth) { - ASSERT(GetNode()->IsWidgetReady()); + DCHECK(GetNode()->IsWidgetReady()); CXFA_Border* borderUI = GetNode()->GetUIBorder(); if (!borderUI) return;
diff --git a/xfa/fxfa/cxfa_textlayout.cpp b/xfa/fxfa/cxfa_textlayout.cpp index a13b8eb..e6a1135 100644 --- a/xfa/fxfa/cxfa_textlayout.cpp +++ b/xfa/fxfa/cxfa_textlayout.cpp
@@ -20,6 +20,7 @@ #include "core/fxge/cfx_renderdevice.h" #include "core/fxge/text_char_pos.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "third_party/base/notreached.h" #include "third_party/base/stl_util.h" #include "xfa/fde/cfde_textout.h" @@ -87,7 +88,7 @@ m_pTextProvider(pTextProvider), m_pTextParser(cppgc::MakeGarbageCollected<CXFA_TextParser>( doc->GetHeap()->GetAllocationHandle())) { - ASSERT(m_pTextProvider); + DCHECK(m_pTextProvider); } CXFA_TextLayout::~CXFA_TextLayout() = default; @@ -484,7 +485,7 @@ } bool CXFA_TextLayout::LayoutInternal(size_t szBlockIndex) { - ASSERT(szBlockIndex < CountBlocks()); + DCHECK(szBlockIndex < CountBlocks()); if (!m_pLoader || m_pLoader->fWidth < 1) return false;
diff --git a/xfa/fxfa/cxfa_textparser.cpp b/xfa/fxfa/cxfa_textparser.cpp index aae5179..3ac9e3e 100644 --- a/xfa/fxfa/cxfa_textparser.cpp +++ b/xfa/fxfa/cxfa_textparser.cpp
@@ -18,6 +18,7 @@ #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlnode.h" #include "core/fxge/fx_font.h" +#include "third_party/base/check.h" #include "third_party/base/notreached.h" #include "xfa/fgas/font/cfgas_fontmgr.h" #include "xfa/fgas/font/cfgas_gefont.h" @@ -175,7 +176,7 @@ RetainPtr<CFX_CSSComputedStyle> CXFA_TextParser::CreateStyle( const CFX_CSSComputedStyle* pParentStyle) { auto pNewStyle = m_pSelector->CreateComputedStyle(pParentStyle); - ASSERT(pNewStyle); + DCHECK(pNewStyle); if (!pParentStyle) return pNewStyle;
diff --git a/xfa/fxfa/cxfa_textprovider.cpp b/xfa/fxfa/cxfa_textprovider.cpp index 66f9e6c..c08452d 100644 --- a/xfa/fxfa/cxfa_textprovider.cpp +++ b/xfa/fxfa/cxfa_textprovider.cpp
@@ -11,6 +11,7 @@ #include "fxjs/xfa/cfxjse_engine.h" #include "fxjs/xfa/cfxjse_value.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "xfa/fde/cfde_textout.h" #include "xfa/fxfa/cxfa_eventparam.h" #include "xfa/fxfa/cxfa_ffapp.h" @@ -35,7 +36,7 @@ CXFA_TextProvider::CXFA_TextProvider(CXFA_Node* pNode, XFA_TEXTPROVIDERTYPE eType) : m_pNode(pNode), m_eType(eType) { - ASSERT(m_pNode); + DCHECK(m_pNode); } CXFA_TextProvider::~CXFA_TextProvider() = default;
diff --git a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp index 38e58e9..b4af8c9 100644 --- a/xfa/fxfa/fm2js/cxfa_fmexpression.cpp +++ b/xfa/fxfa/fm2js/cxfa_fmexpression.cpp
@@ -13,6 +13,7 @@ #include "core/fxcrt/cfx_widetextbuf.h" #include "core/fxcrt/fx_extension.h" #include "fxjs/gc/container_trace.h" +#include "third_party/base/check.h" #include "v8/include/cppgc/visitor.h" #include "xfa/fxfa/fm2js/cxfa_fmtojavascriptdepth.h" @@ -720,7 +721,7 @@ : m_wsName(std::move(wsName)), m_pArguments(std::move(arguments)), m_pExpressions(std::move(expressions)) { - ASSERT(!m_wsName.IsEmpty()); + DCHECK(!m_wsName.IsEmpty()); } CXFA_FMFunctionDefinition::~CXFA_FMFunctionDefinition() = default; @@ -952,7 +953,7 @@ m_pIfExpression(pIfExpression), m_pElseIfExpressions(std::move(pElseIfExpressions)), m_pElseExpression(pElseExpression) { - ASSERT(m_pExpression); + DCHECK(m_pExpression); } CXFA_FMIfExpression::~CXFA_FMIfExpression() = default;
diff --git a/xfa/fxfa/layout/cxfa_contentlayoutprocessor.cpp b/xfa/fxfa/layout/cxfa_contentlayoutprocessor.cpp index 93f9084..9c48284 100644 --- a/xfa/fxfa/layout/cxfa_contentlayoutprocessor.cpp +++ b/xfa/fxfa/layout/cxfa_contentlayoutprocessor.cpp
@@ -12,6 +12,7 @@ #include "fxjs/gc/container_trace.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "third_party/base/compiler_specific.h" #include "third_party/base/containers/adapters.h" #include "third_party/base/notreached.h" @@ -622,8 +623,8 @@ : m_pHeap(pHeap), m_pFormNode(pNode), m_pViewLayoutProcessor(pViewLayoutProcessor) { - ASSERT(GetFormNode()); - ASSERT(GetFormNode()->IsContainerNode() || + DCHECK(GetFormNode()); + DCHECK(GetFormNode()->IsContainerNode() || GetFormNode()->GetElementType() == XFA_Element::Form); m_pOldLayoutItem = ToContentLayoutItem(GetFormNode()->JSObject()->GetLayoutItem()); @@ -670,7 +671,7 @@ } float CXFA_ContentLayoutProcessor::FindSplitPos(float fProposedSplitPos) { - ASSERT(m_pLayoutItem); + DCHECK(m_pLayoutItem); auto value = GetFormNode()->JSObject()->TryEnum(XFA_Attribute::Layout, true); XFA_AttributeValue eLayout = value.value_or(XFA_AttributeValue::Position); bool bCalculateMargin = eLayout != XFA_AttributeValue::Position; @@ -811,7 +812,7 @@ } void CXFA_ContentLayoutProcessor::SplitLayoutItem(float fSplitPos) { - ASSERT(m_pLayoutItem); + DCHECK(m_pLayoutItem); SplitLayoutItem(m_pLayoutItem.Get(), nullptr, fSplitPos); } @@ -1153,7 +1154,7 @@ if (!pLayoutNode) pLayoutNode = GetFormNode(); - ASSERT(!m_pCurChildNode); + DCHECK(!m_pCurChildNode); m_pLayoutItem = CreateContentLayoutItem(GetFormNode()); bool bContainerWidthAutoSize = true; @@ -1800,7 +1801,7 @@ break; } case Stage::kContainer: { - ASSERT(m_pCurChildNode->IsContainerNode()); + DCHECK(m_pCurChildNode->IsContainerNode()); if (m_pCurChildNode->GetElementType() == XFA_Element::Variables) break; if (fContentCurRowY >= fHeightLimit + kXFALayoutPrecision && @@ -2055,7 +2056,7 @@ if (m_pLayoutItem) return; - ASSERT(!m_pCurChildNode); + DCHECK(!m_pCurChildNode); m_pLayoutItem = CreateContentLayoutItem(GetFormNode()); if (!m_pLayoutItem) return;
diff --git a/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp b/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp index caba9df..b679423 100644 --- a/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp +++ b/xfa/fxfa/layout/cxfa_viewlayoutprocessor.cpp
@@ -11,6 +11,7 @@ #include "fxjs/gc/container_trace.h" #include "fxjs/xfa/cfxjse_engine.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "third_party/base/stl_util.h" #include "xfa/fxfa/cxfa_ffnotify.h" #include "xfa/fxfa/cxfa_ffpageview.h" @@ -381,7 +382,7 @@ m_pPageSetNode = pTemplateNode->JSObject()->GetOrCreateProperty<CXFA_PageSet>( 0, XFA_Element::PageSet); - ASSERT(m_pPageSetNode); + DCHECK(m_pPageSetNode); if (m_pPageSetRootLayoutItem) { m_pPageSetRootLayoutItem->RemoveSelfIfParented(); @@ -597,7 +598,7 @@ CXFA_ViewLayoutProcessor::CXFA_ViewRecord* CXFA_ViewLayoutProcessor::CreateViewRecord(CXFA_Node* pPageNode, bool bCreateNew) { - ASSERT(pPageNode); + DCHECK(pPageNode); auto* pNewRecord = cppgc::MakeGarbageCollected<CXFA_ViewRecord>( GetHeap()->GetAllocationHandle()); if (!HasCurrentViewRecord()) { @@ -1679,7 +1680,7 @@ CXFA_Node* pPendingPageSet = nullptr; ViewLayoutItemIterator iterator(pRootLayout); CXFA_ViewLayoutItem* pRootPageSetViewItem = iterator.GetCurrent(); - ASSERT(pRootPageSetViewItem->GetFormNode()->GetElementType() == + DCHECK(pRootPageSetViewItem->GetFormNode()->GetElementType() == XFA_Element::PageSet); if (pending_index < pDocument->GetPendingNodesCount()) { pPendingPageSet = pDocument->GetPendingNodeAtIndex(pending_index);
diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp index 50106ab..6861a2b 100644 --- a/xfa/fxfa/parser/cxfa_dataexporter.cpp +++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp
@@ -9,6 +9,7 @@ #include "core/fxcrt/fx_codepage.h" #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlnode.h" +#include "third_party/base/check.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_node.h" #include "xfa/fxfa/parser/xfa_utils.h" @@ -19,10 +20,7 @@ bool CXFA_DataExporter::Export(const RetainPtr<IFX_SeekableStream>& pStream, CXFA_Node* pNode) { - ASSERT(pStream); - - if (!pStream) - return false; + DCHECK(pStream); if (pNode->IsModelNode()) { switch (pNode->GetPacketType()) { @@ -42,7 +40,7 @@ return false; CXFA_Node* pDataNode = pNode->GetFirstChild(); - ASSERT(pDataNode); + DCHECK(pDataNode); XFA_DataExporter_DealWithDataGroupNode(pDataNode); pElement->Save(pStream); break;
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp index 295c6e8..1e74a81 100644 --- a/xfa/fxfa/parser/cxfa_document.cpp +++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -15,6 +15,7 @@ #include "fxjs/gc/container_trace.h" #include "fxjs/xfa/cfxjse_engine.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "third_party/base/compiler_specific.h" #include "third_party/base/notreached.h" #include "third_party/base/stl_util.h" @@ -71,7 +72,7 @@ }; void FormValueNode_MatchNoneCreateChild(CXFA_Node* pFormNode) { - ASSERT(pFormNode->IsWidgetReady()); + DCHECK(pFormNode->IsWidgetReady()); // GetUIChildNode has the side effect of creating the UI child. pFormNode->GetUIChildNode(); } @@ -94,7 +95,7 @@ if (!pValueNode) return; - ASSERT(pValueNode->GetPacketType() == XFA_PacketType::Form); + DCHECK(pValueNode->GetPacketType() == XFA_PacketType::Form); CXFA_Node* pChildNode = FormValueNode_CreateChild(pValueNode, iType); if (!pChildNode) return; @@ -493,7 +494,7 @@ if (eType != XFA_Element::Field && eType != XFA_Element::ExclGroup) return; - ASSERT(pFormNode->IsWidgetReady()); + DCHECK(pFormNode->IsWidgetReady()); auto* defValue = pFormNode->JSObject()->GetOrCreateProperty<CXFA_Value>( 0, XFA_Element::Value); if (!bDataToForm) { @@ -510,7 +511,7 @@ } CFX_XMLElement* pXMLDataElement = ToXMLElement(pDataNode->GetXMLMappingNode()); - ASSERT(pXMLDataElement); + DCHECK(pXMLDataElement); pDataNode->JSObject()->SetAttributeValue( wsValue, pFormNode->GetFormatDataValue(wsValue)); pDataNode->JSObject()->SetCData(XFA_Attribute::ContentType, @@ -783,7 +784,7 @@ bool bUpLevel) { CXFA_Node* pFieldNode = XFA_NodeMerge_CloneOrMergeContainer( pDocument, pFormNode, pTemplateNode, false, nullptr); - ASSERT(pFieldNode); + DCHECK(pFieldNode); for (CXFA_Node* pTemplateChildNode = pTemplateNode->GetFirstChild(); pTemplateChildNode; pTemplateChildNode = pTemplateChildNode->GetNextSibling()) { @@ -900,7 +901,7 @@ pFirstInstance = pSubformNode; CreateDataBinding(pSubformNode, pDataNode, true); - ASSERT(pSubformNode); + DCHECK(pSubformNode); subformMapArray[pSubformNode] = pDataNode; nodeArray.push_back(pSubformNode); } @@ -943,7 +944,7 @@ eRelation == XFA_AttributeValue::Unordered) { CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer( pDocument, pFormParentNode, pTemplateNode, false, pSearchArray); - ASSERT(pSubformSetNode); + DCHECK(pSubformSetNode); if (!pFirstInstance) pFirstInstance = pSubformSetNode; @@ -983,7 +984,7 @@ switch (eRelation) { case XFA_AttributeValue::Choice: { - ASSERT(!rgItemMatchList.empty()); + DCHECK(!rgItemMatchList.empty()); SortRecurseRecord(&rgItemMatchList, pDataScope, true); pDocument->DataMerge_CopyContainer( rgItemMatchList.front().pTemplateChild, pSubformSetNode, @@ -1011,7 +1012,7 @@ } else { CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer( pDocument, pFormParentNode, pTemplateNode, false, pSearchArray); - ASSERT(pSubformSetNode); + DCHECK(pSubformSetNode); if (!pFirstInstance) pFirstInstance = pSubformSetNode; @@ -1052,7 +1053,7 @@ } CXFA_Node* pSubformNode = XFA_NodeMerge_CloneOrMergeContainer( pDocument, pFormParentNode, pTemplateNode, false, pSearchArray); - ASSERT(pSubformNode); + DCHECK(pSubformNode); if (!pFirstInstance) pFirstInstance = pSubformNode; @@ -1076,7 +1077,7 @@ for (; iCurRepeatIndex < iMinimalLimit; iCurRepeatIndex++) { CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer( pDocument, pFormParentNode, pTemplateNode, false, pSearchArray); - ASSERT(pSubformSetNode); + DCHECK(pSubformSetNode); if (!pFirstInstance) pFirstInstance = pSubformSetNode; @@ -1146,7 +1147,7 @@ } else { CXFA_Node* pDataParent = pDataNode->GetParent(); if (pDataParent != pDataScope) { - ASSERT(pDataParent); + DCHECK(pDataParent); pDataParent->RemoveChildAndNotify(pDataNode, true); pDataScope->InsertChildAndNotify(pDataNode, nullptr); } @@ -1232,7 +1233,7 @@ } void UpdateDataRelation(CXFA_Node* pDataNode, CXFA_Node* pDataDescriptionNode) { - ASSERT(pDataDescriptionNode); + DCHECK(pDataDescriptionNode); for (CXFA_Node* pDataChild = pDataNode->GetFirstChild(); pDataChild; pDataChild = pDataChild->GetNextSibling()) { uint32_t dwNameHash = pDataChild->GetNameHash(); @@ -1442,13 +1443,13 @@ } CFXJSE_Engine* CXFA_Document::InitScriptContext(CJS_Runtime* fxjs_runtime) { - ASSERT(!m_pScriptContext); + DCHECK(!m_pScriptContext); m_pScriptContext = std::make_unique<CFXJSE_Engine>(this, fxjs_runtime); return m_pScriptContext.get(); } CFXJSE_Engine* CXFA_Document::GetScriptContext() const { - ASSERT(m_pScriptContext); + DCHECK(m_pScriptContext); return m_pScriptContext.get(); } @@ -1594,7 +1595,7 @@ bool bOneInstance, bool bDataMerge, bool bUpLevel) { - ASSERT(pTemplateNode->IsContainerNode()); + DCHECK(pTemplateNode->IsContainerNode()); switch (pTemplateNode->GetElementType()) { case XFA_Element::Area: case XFA_Element::PageArea: @@ -1723,7 +1724,7 @@ bEmptyForm = true; pFormRoot = static_cast<CXFA_Form*>( CreateNode(XFA_PacketType::Form, XFA_Element::Form)); - ASSERT(pFormRoot); + DCHECK(pFormRoot); pFormRoot->JSObject()->SetCData(XFA_Attribute::Name, L"form"); m_pRootNode->InsertChildAndNotify(pFormRoot, nullptr); } else { @@ -1737,7 +1738,7 @@ CXFA_Node* pSubformSetNode = XFA_NodeMerge_CloneOrMergeContainer( this, pFormRoot, pTemplateChosen, false, nullptr); - ASSERT(pSubformSetNode); + DCHECK(pSubformSetNode); if (!pDataTopLevel) { WideString wsFormName = pSubformSetNode->JSObject()->GetCData(XFA_Attribute::Name); @@ -1757,7 +1758,7 @@ pDataRoot->InsertChildAndNotify(pDataTopLevel, pBeforeNode); } - ASSERT(pDataTopLevel); + DCHECK(pDataTopLevel); CreateDataBinding(pSubformSetNode, pDataTopLevel, true); for (CXFA_Node* pTemplateChild = pTemplateChosen->GetFirstChild(); pTemplateChild; pTemplateChild = pTemplateChild->GetNextSibling()) {
diff --git a/xfa/fxfa/parser/cxfa_document_builder.cpp b/xfa/fxfa/parser/cxfa_document_builder.cpp index 8a40cf0..6a74532 100644 --- a/xfa/fxfa/parser/cxfa_document_builder.cpp +++ b/xfa/fxfa/parser/cxfa_document_builder.cpp
@@ -21,6 +21,7 @@ #include "core/fxcrt/xml/cfx_xmlnode.h" #include "core/fxcrt/xml/cfx_xmltext.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "third_party/base/notreached.h" #include "third_party/base/optional.h" #include "xfa/fxfa/fxfa.h" @@ -762,7 +763,7 @@ if (pXFANode->IsContentNode()) { CXFA_Node* pContentRawDataNode = node_factory_->CreateNode(ePacketID, element); - ASSERT(pContentRawDataNode); + DCHECK(pContentRawDataNode); pContentRawDataNode->JSObject()->SetCData(XFA_Attribute::Value, wsValue); pXFANode->InsertChildAndNotify(pContentRawDataNode, nullptr); } else {
diff --git a/xfa/fxfa/parser/cxfa_localemgr.cpp b/xfa/fxfa/parser/cxfa_localemgr.cpp index b5da74e..3caec11 100644 --- a/xfa/fxfa/parser/cxfa_localemgr.cpp +++ b/xfa/fxfa/parser/cxfa_localemgr.cpp
@@ -15,6 +15,7 @@ #include "core/fxcrt/fx_memory_wrappers.h" #include "fxjs/gc/container_trace.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "xfa/fxfa/parser/cxfa_acrobat.h" #include "xfa/fxfa/parser/cxfa_common.h" #include "xfa/fxfa/parser/cxfa_locale.h" @@ -1236,7 +1237,7 @@ if (m_bConfigLocaleCached) return m_wsConfigLocale; - ASSERT(!m_wsConfigLocale.has_value()); + DCHECK(!m_wsConfigLocale.has_value()); m_bConfigLocaleCached = true; if (!pConfig) return m_wsConfigLocale;
diff --git a/xfa/fxfa/parser/cxfa_localevalue.cpp b/xfa/fxfa/parser/cxfa_localevalue.cpp index 15bbdbc..03cee6b 100644 --- a/xfa/fxfa/parser/cxfa_localevalue.cpp +++ b/xfa/fxfa/parser/cxfa_localevalue.cpp
@@ -12,6 +12,7 @@ #include <vector> #include "core/fxcrt/fx_extension.h" +#include "third_party/base/check.h" #include "third_party/base/span.h" #include "third_party/base/stl_util.h" #include "xfa/fgas/crt/cfgas_stringformatter.h" @@ -634,9 +635,9 @@ void CXFA_LocaleValue::GetNumericFormat(WideString& wsFormat, int32_t nIntLen, int32_t nDecLen) { - ASSERT(wsFormat.IsEmpty()); - ASSERT(nIntLen >= -1); - ASSERT(nDecLen >= -1); + DCHECK(wsFormat.IsEmpty()); + DCHECK(nIntLen >= -1); + DCHECK(nDecLen >= -1); int32_t nTotalLen = (nIntLen >= 0 ? nIntLen : 2) + 1 + (nDecLen >= 0 ? nDecLen : 2) + (nDecLen == 0 ? 0 : 1); @@ -710,7 +711,7 @@ return false; while (nf < nCountFmt && (cf = spFmt[nf]) != L'.') { - ASSERT(cf == L'z' || cf == L'*'); + DCHECK(cf == L'z' || cf == L'*'); ++nf; }
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 9c5b127..d2d1e63 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -27,6 +27,7 @@ #include "fxjs/xfa/cfxjse_engine.h" #include "fxjs/xfa/cfxjse_value.h" #include "fxjs/xfa/cjx_node.h" +#include "third_party/base/check.h" #include "third_party/base/compiler_specific.h" #include "third_party/base/notreached.h" #include "third_party/base/span.h" @@ -753,8 +754,8 @@ std::vector<CXFA_Node*>* pSiblings, bool bIsClassName, bool bIsFindProperty) { - ASSERT(parent); - ASSERT(pSiblings); + DCHECK(parent); + DCHECK(pSiblings); if (bIsFindProperty) { for (CXFA_Node* child : @@ -982,7 +983,7 @@ m_Attributes(attributes), m_ValidPackets(validPackets), m_ePacket(ePacket) { - ASSERT(m_pDocument); + DCHECK(m_pDocument); } CXFA_Node::~CXFA_Node() = default; @@ -1075,7 +1076,7 @@ const CXFA_Node::PropertyData* CXFA_Node::GetPropertyData( XFA_Element property) const { - ASSERT(property != XFA_Element::Unknown); + DCHECK(property != XFA_Element::Unknown); for (const auto& prop : m_Properties) { if (prop.property == property) return ∝ @@ -1157,7 +1158,7 @@ const CXFA_Node::AttributeData* CXFA_Node::GetAttributeData( XFA_Attribute attr) const { - ASSERT(attr != XFA_Attribute::Unknown); + DCHECK(attr != XFA_Attribute::Unknown); for (const auto& cur_attr : m_Attributes) { if (cur_attr.attribute == attr) return &cur_attr; @@ -1252,7 +1253,7 @@ } CXFA_Node* CXFA_Node::CloneTemplateToForm(bool bRecursive) { - ASSERT(m_ePacket == XFA_PacketType::Template); + DCHECK(m_ePacket == XFA_PacketType::Template); CXFA_Node* pClone = m_pDocument->CreateNode(XFA_PacketType::Form, m_elementType); if (!pClone) @@ -1281,7 +1282,7 @@ } CXFA_Node* CXFA_Node::GetBindData() { - ASSERT(GetPacketType() == XFA_PacketType::Form); + DCHECK(GetPacketType() == XFA_PacketType::Form); return GetBindingNode(); } @@ -1290,7 +1291,7 @@ } void CXFA_Node::AddBindItem(CXFA_Node* pFormNode) { - ASSERT(pFormNode); + DCHECK(pFormNode); if (BindsFormItems()) { if (!pdfium::Contains(binding_nodes_, pFormNode)) @@ -1512,7 +1513,7 @@ } void CXFA_Node::SetDataDescriptionNode(CXFA_Node* pDataDescriptionNode) { - ASSERT(m_ePacket == XFA_PacketType::Datasets); + DCHECK(m_ePacket == XFA_PacketType::Datasets); m_pAuxNode = pDataDescriptionNode; } @@ -1589,7 +1590,7 @@ if (!IsNeedSavingXMLNode() || !pNode->xml_node_) return; - ASSERT(!pNode->xml_node_->GetParent()); + DCHECK(!pNode->xml_node_->GetParent()); xml_node_->InsertBefore(pNode->xml_node_.Get(), pBeforeNode ? pBeforeNode->xml_node_.Get() : nullptr); } @@ -1611,7 +1612,7 @@ return; } - ASSERT(pNode->xml_node_ == xml_node_); + DCHECK(pNode->xml_node_ == xml_node_); CFX_XMLElement* pXMLElement = ToXMLElement(pNode->xml_node_.Get()); if (pXMLElement) { WideString wsAttributeName = @@ -1777,7 +1778,7 @@ } void CXFA_Node::SetFlagAndNotify(uint32_t dwFlag) { - ASSERT(dwFlag == XFA_NodeFlag_Initialized); + DCHECK(dwFlag == XFA_NodeFlag_Initialized); if (!IsInitialized()) { CXFA_FFNotify* pNotify = m_pDocument->GetNotify(); @@ -2001,7 +2002,7 @@ } if (!pDataScope) { pDataScope = ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Record)); - ASSERT(pDataScope); + DCHECK(pDataScope); } CXFA_Node* pInstance = pDocument->DataMerge_CopyContainer( @@ -2731,7 +2732,7 @@ if (m_ExecuteRecursionDepth > kMaxExecuteRecursion) return {XFA_EventError::kSuccess, false}; - ASSERT(pEventParam); + DCHECK(pEventParam); if (!script) return {XFA_EventError::kNotExist, false}; if (script->GetRunAt() == XFA_AttributeValue::Server) @@ -2805,12 +2806,12 @@ std::pair<XFA_FFWidgetType, CXFA_Ui*> CXFA_Node::CreateChildUIAndValueNodesIfNeeded() { XFA_Element eType = GetElementType(); - ASSERT(eType == XFA_Element::Field || eType == XFA_Element::Draw); + DCHECK(eType == XFA_Element::Field || eType == XFA_Element::Draw); // Both Field and Draw have a UI property. We should always be able to // retrieve or create the UI element. If we can't something is wrong. CXFA_Ui* pUI = JSObject()->GetOrCreateProperty<CXFA_Ui>(0, XFA_Element::Ui); - ASSERT(pUI); + DCHECK(pUI); CXFA_Node* pUIChild = nullptr; // Search through the children of the UI node to see if we have any of our @@ -2831,7 +2832,7 @@ // reason something has gone really wrong. CXFA_Value* value = JSObject()->GetOrCreateProperty<CXFA_Value>(0, XFA_Element::Value); - ASSERT(value); + DCHECK(value); // The Value nodes only have One-Of children. So, if we have a first child // that child must be the type we want to use. @@ -2944,7 +2945,7 @@ } CXFA_Node* CXFA_Node::GetUIChildNode() { - ASSERT(HasCreatedUIWidget()); + DCHECK(HasCreatedUIWidget()); if (ff_widget_type_ != XFA_FFWidgetType::kNone) return ui_ ? ui_->GetFirstChild() : nullptr;
diff --git a/xfa/fxfa/parser/cxfa_nodeowner.cpp b/xfa/fxfa/parser/cxfa_nodeowner.cpp index 03fa9fe..44a58bc 100644 --- a/xfa/fxfa/parser/cxfa_nodeowner.cpp +++ b/xfa/fxfa/parser/cxfa_nodeowner.cpp
@@ -7,6 +7,7 @@ #include "xfa/fxfa/parser/cxfa_nodeowner.h" #include "fxjs/gc/container_trace.h" +#include "third_party/base/check.h" #include "xfa/fxfa/parser/cxfa_list.h" #include "xfa/fxfa/parser/cxfa_node.h" @@ -19,6 +20,6 @@ } void CXFA_NodeOwner::PersistList(CXFA_List* list) { - ASSERT(list); + DCHECK(list); lists_.emplace_back(list); }
diff --git a/xfa/fxfa/parser/cxfa_rectangle.cpp b/xfa/fxfa/parser/cxfa_rectangle.cpp index cd920df..e640bc3 100644 --- a/xfa/fxfa/parser/cxfa_rectangle.cpp +++ b/xfa/fxfa/parser/cxfa_rectangle.cpp
@@ -10,6 +10,7 @@ #include <utility> #include "fxjs/xfa/cjx_node.h" +#include "third_party/base/check.h" #include "third_party/base/notreached.h" #include "xfa/fxfa/parser/cxfa_corner.h" #include "xfa/fxfa/parser/cxfa_document.h" @@ -460,8 +461,8 @@ int32_t nIndex, bool bStart, bool bCorner) { - ASSERT(nIndex >= 0); - ASSERT(nIndex < 8); + DCHECK(nIndex >= 0); + DCHECK(nIndex < 8); int32_t n = (nIndex & 1) ? nIndex - 1 : nIndex; CXFA_Stroke* corner1 = strokes[n];
diff --git a/xfa/fxfa/parser/cxfa_xmllocale.cpp b/xfa/fxfa/parser/cxfa_xmllocale.cpp index aaad186..b28c4ec 100644 --- a/xfa/fxfa/parser/cxfa_xmllocale.cpp +++ b/xfa/fxfa/parser/cxfa_xmllocale.cpp
@@ -13,6 +13,7 @@ #include "core/fxcrt/xml/cfx_xmldocument.h" #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlparser.h" +#include "third_party/base/check.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_localemgr.h" #include "xfa/fxfa/parser/cxfa_nodelocale.h" @@ -51,8 +52,8 @@ CXFA_XMLLocale::CXFA_XMLLocale(std::unique_ptr<CFX_XMLDocument> doc, CFX_XMLElement* locale) : xml_doc_(std::move(doc)), locale_(locale) { - ASSERT(xml_doc_); - ASSERT(locale_); + DCHECK(xml_doc_); + DCHECK(locale_); } CXFA_XMLLocale::~CXFA_XMLLocale() = default;
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp index e9a01ba..098b662 100644 --- a/xfa/fxfa/parser/xfa_utils.cpp +++ b/xfa/fxfa/parser/xfa_utils.cpp
@@ -18,6 +18,7 @@ #include "core/fxcrt/xml/cfx_xmlnode.h" #include "core/fxcrt/xml/cfx_xmltext.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/check.h" #include "third_party/base/stl_util.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_localemgr.h" @@ -118,7 +119,7 @@ if (!wsContent) return false; - ASSERT(pContentNode->IsContentNode()); + DCHECK(pContentNode->IsContentNode()); CXFA_Node* pParentNode = pContentNode->GetParent(); if (!pParentNode || pParentNode->GetElementType() != XFA_Element::Value) return true;