summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-07-30 20:27:21 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-30 20:27:21 +0000
commit649e059f5fe93c0de53aaa48a74068703df46301 (patch)
tree94db3f5d67962bda272203a8c11d79b5ffcda33f /xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
parent921d24416f310b6a899f09daa4a2628be5be16f3 (diff)
downloadpdfium-649e059f5fe93c0de53aaa48a74068703df46301.tar.xz
Return unique_ptr from CXFA_FFNotify::OnCreate{Container,Content}LayoutItem()
... and then immediately release it, but it is a step in the right direction. Change-Id: Ib52972c6789d8f98a576d1c69f8019541c96ac51 Reviewed-on: https://pdfium-review.googlesource.com/39152 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_layoutpagemgr.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_layoutpagemgr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
index b6c95c1d56..411ad24e45 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
@@ -582,7 +582,8 @@ void CXFA_LayoutPageMgr::AddPageAreaLayoutItem(CXFA_ContainerRecord* pNewRecord,
pNewPageAreaLayoutItem = pContainerItem;
} else {
CXFA_FFNotify* pNotify = pNewPageArea->GetDocument()->GetNotify();
- auto* pContainerItem = pNotify->OnCreateContainerLayoutItem(pNewPageArea);
+ auto* pContainerItem =
+ pNotify->OnCreateContainerLayoutItem(pNewPageArea).release();
m_PageArray.push_back(pContainerItem);
m_nAvailPages++;
pNotify->OnPageEvent(pContainerItem, XFA_PAGEVIEWEVENT_PostRemoved);