Commit 068d07d1 authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

[Fuchsia] Fix crash in the renderer in LocalFontFaceSource

LocalFontFaceSource was expecting to FontUniqueNameLookup implementation
on all platforms except Mac, but it's implemented only on Android,
Linux and Windows, which was crashing the renderer on Fuchsia.

TBR=drott@chromium.org

Bug: 948938
Change-Id: I5557a37c2cdbf2dd5a8c0a1cb08e847b31bafd00
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1549831
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarKevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#647099}
parent ffd41d65
......@@ -41,13 +41,11 @@ LocalFontFaceSource::LocalFontFaceSource(CSSFontFace* css_font_face,
LocalFontFaceSource::~LocalFontFaceSource() {}
bool LocalFontFaceSource::IsLocalNonBlocking() const {
#if defined(OS_MACOSX)
return true;
#else
FontUniqueNameLookup* unique_name_lookup =
FontGlobalContext::Get()->GetFontUniqueNameLookup();
if (!unique_name_lookup)
return true;
return unique_name_lookup->IsFontUniqueNameLookupReadyForSyncLookup();
#endif
}
bool LocalFontFaceSource::IsLocalFontAvailable(
......
......@@ -28,7 +28,6 @@ FontUniqueNameLookup::GetPlatformUniqueNameLookup() {
#elif defined(OS_WIN)
return std::make_unique<FontUniqueNameLookupWin>();
#else
NOTREACHED();
return nullptr;
#endif
}
......
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