Deprecate 7-Arg form of CFXA_Node constructor. Its use has hidden some bugs in the past, and it is nice to see the relationship between the CXFA_ and CJX_ classes expressed explicitly in the code, since they are not 1:1. Change-Id: Ib4ace6895a85fc8bc1f7af1642981337ac156ecf Reviewed-on: https://pdfium-review.googlesource.com/c/48970 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fxfa/parser/cxfa_documentassembly.cpp b/xfa/fxfa/parser/cxfa_documentassembly.cpp index ee83ef4..beb2be6 100644 --- a/xfa/fxfa/parser/cxfa_documentassembly.cpp +++ b/xfa/fxfa/parser/cxfa_documentassembly.cpp
@@ -6,6 +6,9 @@ #include "xfa/fxfa/parser/cxfa_documentassembly.h" +#include "fxjs/xfa/cjx_node.h" +#include "third_party/base/ptr_util.h" + namespace { const CXFA_Node::AttributeData kDocumentAssemblyAttributeData[] = { @@ -23,6 +26,7 @@ XFA_ObjectType::ContentNode, XFA_Element::DocumentAssembly, nullptr, - kDocumentAssemblyAttributeData) {} + kDocumentAssemblyAttributeData, + pdfium::MakeUnique<CJX_Node>(this)) {} CXFA_DocumentAssembly::~CXFA_DocumentAssembly() = default;