Convert CXFA_ContentLayoutProcessor::m_PendingNodes to Member<>.
Noticed while working on rgCurLineLayoutItems issue. Now that
these are members, be sure to trace them as well.
-- Use ContainerTrace<> templates while at it.
Change-Id: I1d930026901da4320d44dc3cc3decd532e131c8d
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/73253
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fxfa/layout/cxfa_contentlayoutprocessor.cpp b/xfa/fxfa/layout/cxfa_contentlayoutprocessor.cpp
index cfb804e..34fbbcb 100644
--- a/xfa/fxfa/layout/cxfa_contentlayoutprocessor.cpp
+++ b/xfa/fxfa/layout/cxfa_contentlayoutprocessor.cpp
@@ -10,6 +10,7 @@
#include <utility>
#include <vector>
+#include "fxjs/gc/container_trace.h"
#include "fxjs/xfa/cjx_object.h"
#include "third_party/base/compiler_specific.h"
#include "third_party/base/containers/adapters.h"
@@ -639,8 +640,8 @@
visitor->Trace(m_pLayoutItem);
visitor->Trace(m_pOldLayoutItem);
visitor->Trace(m_pViewLayoutProcessor);
- for (const auto& item : m_ArrayKeepItems)
- visitor->Trace(item);
+ ContainerTrace(visitor, m_ArrayKeepItems);
+ ContainerTrace(visitor, m_PendingNodes);
}
CXFA_ContentLayoutItem* CXFA_ContentLayoutProcessor::CreateContentLayoutItem(
diff --git a/xfa/fxfa/layout/cxfa_contentlayoutprocessor.h b/xfa/fxfa/layout/cxfa_contentlayoutprocessor.h
index 4e5f488..0152718 100644
--- a/xfa/fxfa/layout/cxfa_contentlayoutprocessor.h
+++ b/xfa/fxfa/layout/cxfa_contentlayoutprocessor.h
@@ -237,7 +237,7 @@
cppgc::Member<CXFA_ViewLayoutProcessor> m_pViewLayoutProcessor;
std::vector<float> m_rgSpecifiedColumnWidths;
std::vector<cppgc::Member<CXFA_ContentLayoutItem>> m_ArrayKeepItems;
- std::list<CXFA_Node*> m_PendingNodes;
+ std::list<cppgc::Member<CXFA_Node>> m_PendingNodes;
std::map<CXFA_Node*, int32_t> m_PendingNodesCount;
cppgc::Member<CXFA_ContentLayoutProcessor> m_pCurChildPreprocessor;
};