Commit 1e940957 authored by kulshin's avatar kulshin Committed by Commit bot

Pass in the right sender to font proxy init

Previous change passed the sender to FontFallback init, but not
DWriteFontCollectionProxy which is what really matters. This will
ensure that both classes get the right sender.

BUG=631254

Review-Url: https://codereview.chromium.org/2196493003
Cr-Commit-Position: refs/heads/master@{#408804}
parent b82f940c
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment