diff options
author | Cary Clark <caryclark@skia.org> | 2017-07-05 11:05:00 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-05 21:48:15 +0000 |
commit | ddf2418ba8e5d925909d7955ac22b33f37ccce44 (patch) | |
tree | 554cf2f5d122760bdc84506822e258de757e043a /core/fxge/cfx_facecache.h | |
parent | 0ba3c6da16d4e90f0ad1fc9f326bf863860c0470 (diff) | |
download | pdfium-ddf2418ba8e5d925909d7955ac22b33f37ccce44.tar.xz |
typeface double deletechromium/3150
SkTypeface was doubly deleted at pdfium teardown
SkTypeface has two pointers but no owners.
Making the font cache an owner fixes the bug but
violates checkdeps rules. Let me know what to
do about that.
R=dsinclair@chromium.org,npm@chromium.org
Bug: 736133
Change-Id: I756a41258a5ac86e70139d7a587c5da9bb7a707b
Reviewed-on: https://pdfium-review.googlesource.com/7270
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'core/fxge/cfx_facecache.h')
-rw-r--r-- | core/fxge/cfx_facecache.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/fxge/cfx_facecache.h b/core/fxge/cfx_facecache.h index d6847debdb..076ba1f330 100644 --- a/core/fxge/cfx_facecache.h +++ b/core/fxge/cfx_facecache.h @@ -14,6 +14,10 @@ #include "core/fxge/fx_font.h" #include "core/fxge/fx_freetype.h" +#if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_ +#include "third_party/skia/include/core/SkTypeface.h" +#endif + class CFX_FaceCache { public: explicit CFX_FaceCache(FXFT_Face face); @@ -60,7 +64,7 @@ class CFX_FaceCache { std::map<CFX_ByteString, std::unique_ptr<CFX_SizeGlyphCache>> m_SizeMap; std::map<uint32_t, std::unique_ptr<CFX_PathData>> m_PathMap; #if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_ - CFX_UnownedPtr<CFX_TypeFace> m_pTypeface; + sk_sp<SkTypeface> m_pTypeface; #endif }; |