From 4cb82ee95256f110489f2b503e70729c44419e74 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 22 May 2017 15:15:30 -0700 Subject: Convert more c-style pointers to CFX_UnownedPtr Change-Id: I551b4210c95db0b916e9fe6cddf11e6c3d015c50 Reviewed-on: https://pdfium-review.googlesource.com/5790 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- core/fpdfdoc/cpdf_annot.cpp | 4 ++-- core/fpdfdoc/cpdf_annotlist.cpp | 2 +- core/fpdfdoc/cpdf_interform.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fpdfdoc') diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp index a3ee70ab36..146c863cf3 100644 --- a/core/fpdfdoc/cpdf_annot.cpp +++ b/core/fpdfdoc/cpdf_annot.cpp @@ -204,8 +204,8 @@ CPDF_Form* CPDF_Annot::GetAPForm(const CPDF_Page* pPage, AppearanceMode mode) { if (it != m_APMap.end()) return it->second.get(); - auto pNewForm = - pdfium::MakeUnique(m_pDocument, pPage->m_pResources, pStream); + auto pNewForm = pdfium::MakeUnique( + m_pDocument, pPage->m_pResources.Get(), pStream); pNewForm->ParseContent(nullptr, nullptr, nullptr); CPDF_Form* pResult = pNewForm.get(); diff --git a/core/fpdfdoc/cpdf_annotlist.cpp b/core/fpdfdoc/cpdf_annotlist.cpp index ed1b60c287..1427c85616 100644 --- a/core/fpdfdoc/cpdf_annotlist.cpp +++ b/core/fpdfdoc/cpdf_annotlist.cpp @@ -62,7 +62,7 @@ std::unique_ptr CreatePopupAnnot(CPDF_Annot* pAnnot, } // namespace CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage) - : m_pDocument(pPage->m_pDocument) { + : m_pDocument(pPage->m_pDocument.Get()) { if (!pPage->m_pFormDict) return; diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index 88787d2e5b..21e2244703 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -1048,7 +1048,7 @@ bool CPDF_InterForm::HasXFAForm() const { } void CPDF_InterForm::FixPageFields(const CPDF_Page* pPage) { - CPDF_Dictionary* pPageDict = pPage->m_pFormDict; + CPDF_Dictionary* pPageDict = pPage->m_pFormDict.Get(); if (!pPageDict) return; -- cgit v1.2.3