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

Unified Diff: fpdfsdk/fsdk_mgr.cpp

Issue 2258333002: Fix page leaks in an embedder test (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 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 | « fpdfsdk/fsdk_baseform_embeddertest.cpp ('k') | public/fpdf_formfill.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fsdk_mgr.cpp
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index 932bcece9d1063c7226737d020ee1203bc7e96ae..689cbebb51ceda84b2bd6b1e9e233e5d93f8dcd1 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -299,7 +299,10 @@ CPDFSDK_PageView* CPDFSDK_Document::GetPageView(int nIndex) {
return nullptr;
auto it = m_pageMap.find(pTempPage);
- return it->second;
+#ifdef PDF_ENABLE_XFA
+ pTempPage->Release();
Tom Sepez 2016/08/22 19:42:51 might this cause the page to be removed from the m
+#endif
+ return it == m_pageMap.end() ? nullptr : it->second;
}
void CPDFSDK_Document::ProcJavascriptFun() {
« no previous file with comments | « fpdfsdk/fsdk_baseform_embeddertest.cpp ('k') | public/fpdf_formfill.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698