summaryrefslogtreecommitdiff
path: root/xfa/fgas/font/cfgas_fontmgr.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-10-18 16:58:07 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-18 16:58:07 +0000
commit4df46054105e71ecc6a80d29c8d56ef0778b5aa8 (patch)
tree4510d8739ee65cdb56aacbd640d22222f89bc41f /xfa/fgas/font/cfgas_fontmgr.h
parent95d525e83f1f5b5fac15970f767410b21debbb81 (diff)
downloadpdfium-4df46054105e71ecc6a80d29c8d56ef0778b5aa8.tar.xz
Cache CFGAS_FontMgr::GetFontByUnicode() failures on Windows.
Non-Windows does this already, which is why it can handle fuzzers that throws the same invalid unicode character at it efficiently. Whereas Windows tries to do the same failing font load repeatedly. BUG=chromium:895469 Change-Id: I6780d1ec0881222348e05a5a63e7b2238f39a3a6 Reviewed-on: https://pdfium-review.googlesource.com/c/44251 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fgas/font/cfgas_fontmgr.h')
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xfa/fgas/font/cfgas_fontmgr.h b/xfa/fgas/font/cfgas_fontmgr.h
index b784bedfe8..389f96ab1d 100644
--- a/xfa/fgas/font/cfgas_fontmgr.h
+++ b/xfa/fgas/font/cfgas_fontmgr.h
@@ -145,6 +145,7 @@ class CFGAS_FontMgr final : public Observable<CFGAS_FontMgr> {
#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
std::map<uint32_t, std::vector<RetainPtr<CFGAS_GEFont>>> m_Hash2Fonts;
+ std::set<wchar_t> m_FailedUnicodesSet;
#if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
std::deque<FX_FONTDESCRIPTOR> m_FontFaces;
@@ -155,7 +156,6 @@ class CFGAS_FontMgr final : public Observable<CFGAS_FontMgr> {
m_Hash2CandidateList;
std::map<RetainPtr<CFGAS_GEFont>, RetainPtr<IFX_SeekableReadStream>>
m_IFXFont2FileRead;
- std::set<wchar_t> m_FailedUnicodesSet;
#endif // _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_
};