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

Unified Diff: xfa/fgas/font/cfgas_gefont.h

Issue 2631703003: Avoid endless loop deleting CFGAS_GEFont. (Closed)
Patch Set: rebase 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
« no previous file with comments | « xfa/fde/cfde_txtedtengine.cpp ('k') | xfa/fgas/font/cfgas_gefont.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/font/cfgas_gefont.h
diff --git a/xfa/fgas/font/cfgas_gefont.h b/xfa/fgas/font/cfgas_gefont.h
index de4f9639e02c4a9538229fbeecbc629574f874a6..6c9d890df47195a048a4afe79f034b90ff045a3a 100644
--- a/xfa/fgas/font/cfgas_gefont.h
+++ b/xfa/fgas/font/cfgas_gefont.h
@@ -24,6 +24,8 @@ class CXFA_PDFFontMgr;
class CFGAS_GEFont : public CFX_Retainable {
public:
+ template <typename T>
+ friend class CFX_RetainPtr;
template <typename T, typename... Args>
friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
@@ -46,8 +48,6 @@ class CFGAS_GEFont : public CFX_Retainable {
bool bSaveStream);
#endif
- ~CFGAS_GEFont() override;
-
CFX_RetainPtr<CFGAS_GEFont> Derive(uint32_t dwFontStyles,
uint16_t wCodePage = 0);
uint32_t GetFontStyles() const;
@@ -57,7 +57,7 @@ class CFGAS_GEFont : public CFX_Retainable {
int32_t GetDescent() const;
bool GetCharBBox(FX_WCHAR wUnicode, CFX_Rect* bbox, bool bCharCode = false);
bool GetBBox(CFX_Rect* bbox);
- CFX_RetainPtr<CFGAS_GEFont> GetSubstFont(int32_t iGlyphIndex) const;
+ CFX_RetainPtr<CFGAS_GEFont> GetSubstFont(int32_t iGlyphIndex);
CFX_Font* GetDevFont() const { return m_pFont; }
void SetFontProvider(CXFA_PDFFontMgr* pProvider) { m_pProvider = pProvider; }
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
@@ -70,6 +70,7 @@ class CFGAS_GEFont : public CFX_Retainable {
private:
explicit CFGAS_GEFont(CFGAS_FontMgr* pFontMgr);
CFGAS_GEFont(const CFX_RetainPtr<CFGAS_GEFont>& src, uint32_t dwFontStyles);
+ ~CFGAS_GEFont() override;
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
bool LoadFontInternal(const FX_WCHAR* pszFontFamily,
« no previous file with comments | « xfa/fde/cfde_txtedtengine.cpp ('k') | xfa/fgas/font/cfgas_gefont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698