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

Unified Diff: content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc

Issue 2196493003: Pass in the right sender to font proxy init (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
diff --git a/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc b/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
index 7a9a9efef80a0f36e49101e4e566929a76ef30df..c1d59d29a8ce42e0b84aa45d1dc5c6e584b8d9f7 100644
--- a/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
+++ b/content/child/dwrite_font_proxy/dwrite_font_proxy_init_win.cc
@@ -69,13 +69,6 @@ void InitializeDWriteFontProxy() {
CreateDirectWriteFactory(&factory);
- if (!g_font_collection) {
- mswr::MakeAndInitialize<DWriteFontCollectionProxy>(
- &g_font_collection, factory.Get(), g_sender_override);
- }
-
- mswr::ComPtr<IDWriteFontFallback> font_fallback;
- mswr::ComPtr<IDWriteFactory2> factory2;
IPC::Sender* sender = g_sender_override;
// Hack for crbug.com/631254: set the sender if we can get one, so that when
@@ -84,6 +77,14 @@ void InitializeDWriteFontProxy() {
if (!sender && ChildThreadImpl::current())
sender = ChildThreadImpl::current()->thread_safe_sender();
+ if (!g_font_collection) {
+ mswr::MakeAndInitialize<DWriteFontCollectionProxy>(
+ &g_font_collection, factory.Get(), sender);
+ }
+
+ mswr::ComPtr<IDWriteFontFallback> font_fallback;
+ mswr::ComPtr<IDWriteFactory2> factory2;
+
if (SUCCEEDED(factory.As(&factory2)) && factory2.Get()) {
mswr::MakeAndInitialize<FontFallback>(
&font_fallback, g_font_collection.Get(), sender);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698