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

Unified Diff: xfa/fxfa/app/xfa_fwltheme.cpp

Issue 2609423003: Properly ref-count CFGAS_GEFont with CFX_RetainPtr. (Closed)
Patch Set: comments Created 3 years, 11 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
Index: xfa/fxfa/app/xfa_fwltheme.cpp
diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp
index d12678e51b3c60ed77e1d87e66a2c7dbc4aca101..1de302e995d798621a1cf9d5102766bc5161c770 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();

Powered by Google App Engine
This is Rietveld 408576698