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

Unified Diff: chrome/child/pdf_child_init.cc

Issue 906923003: Fix fonts not loading in PDFs that don't embed them. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « chrome/app/chrome_main_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/child/pdf_child_init.cc
diff --git a/chrome/child/pdf_child_init.cc b/chrome/child/pdf_child_init.cc
index 45b403a26e5b05471f6fb47d491328a23edff098..fe9a1a4f29dc6a3cb90a6069260f3dc47af5a9e0 100644
--- a/chrome/child/pdf_child_init.cc
+++ b/chrome/child/pdf_child_init.cc
@@ -50,9 +50,11 @@ DWORD WINAPI GetFontDataPatch(HDC hdc,
LOGFONT logfont;
if (GetObject(font, sizeof(LOGFONT), &logfont)) {
std::vector<char> font_data;
- content::ChildThread::Get()->PreCacheFont(logfont);
+ if (content::ChildThread::Get())
+ content::ChildThread::Get()->PreCacheFont(logfont);
rv = g_original_get_font_data(hdc, table, offset, buffer, length);
- content::ChildThread::Get()->ReleaseCachedFonts();
+ if (content::ChildThread::Get())
+ content::ChildThread::Get()->ReleaseCachedFonts();
}
}
return rv;
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698