From e647799f6a2f7f747c9f55d9f0ce08dcdfbd53f4 Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 5 Jan 2017 12:57:00 -0800 Subject: Properly ref-count CFGAS_GEFont with CFX_RetainPtr. We worry about cyclical references, but no leaks found. Review-Url: https://codereview.chromium.org/2609423003 --- xfa/fxfa/app/xfa_textlayout.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/app/xfa_textlayout.cpp') diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp index ea4ae4b2da..826fefcfbc 100644 --- a/xfa/fxfa/app/xfa_textlayout.cpp +++ b/xfa/fxfa/app/xfa_textlayout.cpp @@ -376,8 +376,10 @@ bool CXFA_TextParser::IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const { } return false; } -CFGAS_GEFont* CXFA_TextParser::GetFont(CXFA_TextProvider* pTextProvider, - IFDE_CSSComputedStyle* pStyle) const { + +CFX_RetainPtr CXFA_TextParser::GetFont( + CXFA_TextProvider* pTextProvider, + IFDE_CSSComputedStyle* pStyle) const { CFX_WideStringC wsFamily = FX_WSTRC(L"Courier"); uint32_t dwStyle = 0; CXFA_Font font = pTextProvider->GetFontNode(); -- cgit v1.2.3