Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1009)

Unified Diff: core/fpdfdoc/cpdf_annotlist.cpp

Issue 2301613002: Fix leaks due to created popup annotations (Closed)
Patch Set: fix typo Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfdoc/cpdf_annot.cpp ('k') | core/fpdfdoc/include/cpdf_annot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/cpdf_annotlist.cpp
diff --git a/core/fpdfdoc/cpdf_annotlist.cpp b/core/fpdfdoc/cpdf_annotlist.cpp
index 61122ed59b99ee32a031b0a8a8f6f8e5f227d3d8..631978175c5d8b5662fcc2fe7e1f96a89ce2b0fe 100644
--- a/core/fpdfdoc/cpdf_annotlist.cpp
+++ b/core/fpdfdoc/cpdf_annotlist.cpp
@@ -43,7 +43,7 @@ std::unique_ptr<CPDF_Annot> CreatePopupAnnot(CPDF_Annot* pAnnot,
pAnnotDict->SetAtInteger("F", 0);
std::unique_ptr<CPDF_Annot> pPopupAnnot(
- new CPDF_Annot(pAnnotDict, pDocument));
+ new CPDF_Annot(pAnnotDict, pDocument, true));
pAnnot->SetPopupAnnot(pPopupAnnot.get());
return pPopupAnnot;
}
@@ -83,7 +83,7 @@ CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage)
continue;
m_AnnotList.push_back(
- std::unique_ptr<CPDF_Annot>(new CPDF_Annot(pDict, m_pDocument)));
+ std::unique_ptr<CPDF_Annot>(new CPDF_Annot(pDict, m_pDocument, false)));
if (bRegenerateAP && pDict->GetStringBy("Subtype") == "Widget" &&
CPDF_InterForm::IsUpdateAPEnabled()) {
FPDF_GenerateAP(m_pDocument, pDict);
« no previous file with comments | « core/fpdfdoc/cpdf_annot.cpp ('k') | core/fpdfdoc/include/cpdf_annot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698