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

Unified Diff: xfa/fxfa/app/xfa_textlayout.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_textlayout.cpp
diff --git a/xfa/fxfa/app/xfa_textlayout.cpp b/xfa/fxfa/app/xfa_textlayout.cpp
index 69b53eedb4d5ac9c382350d15e9f0542cbccd58f..2cb43205349443783df81d063d7217f193a29ce3 100644
--- a/xfa/fxfa/app/xfa_textlayout.cpp
+++ b/xfa/fxfa/app/xfa_textlayout.cpp
@@ -375,8 +375,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<CFGAS_GEFont> 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();

Powered by Google App Engine
This is Rietveld 408576698