summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_fwltheme.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-05 12:57:00 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-05 12:57:00 -0800
commite647799f6a2f7f747c9f55d9f0ce08dcdfbd53f4 (patch)
tree282c502bd9f807f385d0cbcc1692bb475c8a4df1 /xfa/fxfa/app/xfa_fwltheme.cpp
parent6bb3b894488fd6f38c096b708980a9f08286ac5c (diff)
downloadpdfium-e647799f6a2f7f747c9f55d9f0ce08dcdfbd53f4.tar.xz
Properly ref-count CFGAS_GEFont with CFX_RetainPtr.
We worry about cyclical references, but no leaks found. Review-Url: https://codereview.chromium.org/2609423003
Diffstat (limited to 'xfa/fxfa/app/xfa_fwltheme.cpp')
-rw-r--r--xfa/fxfa/app/xfa_fwltheme.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp
index d12678e51b..1de302e995 100644
--- a/xfa/fxfa/app/xfa_fwltheme.cpp
+++ b/xfa/fxfa/app/xfa_fwltheme.cpp
@@ -75,10 +75,6 @@ CXFA_FWLTheme::CXFA_FWLTheme(CXFA_FFApp* pApp)
CXFA_FWLTheme::~CXFA_FWLTheme() {
m_pTextOut.reset();
- if (m_pCalendarFont) {
- m_pCalendarFont->Release();
- m_pCalendarFont = nullptr;
- }
FWLTHEME_Release();
}
@@ -193,7 +189,8 @@ float CXFA_FWLTheme::GetFontSize(CFWL_ThemePart* pThemePart) const {
return FWLTHEME_CAPACITY_FontSize;
}
-CFGAS_GEFont* CXFA_FWLTheme::GetFont(CFWL_ThemePart* pThemePart) const {
+CFX_RetainPtr<CFGAS_GEFont> CXFA_FWLTheme::GetFont(
+ CFWL_ThemePart* pThemePart) const {
if (CXFA_FFWidget* pWidget = XFA_ThemeGetOuterWidget(pThemePart->m_pWidget))
return pWidget->GetDataAcc()->GetFDEFont();
return GetTheme(pThemePart->m_pWidget)->GetFont();