Index: third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp |
diff --git a/third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp b/third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp |
index 21dbcbfab0bd528c79b3fcbdf8d30b945d0b8381..6decd579867605f5496fb6276a086d17fa0087bd 100644 |
--- a/third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp |
+++ b/third_party/WebKit/Source/platform/fonts/win/FontFallbackWin.cpp |
@@ -47,13 +47,10 @@ namespace { |
static inline bool isFontPresent(const UChar* fontName, SkFontMgr* fontManager) |
{ |
String family = fontName; |
- SkTypeface* typeface; |
- typeface = fontManager->matchFamilyStyle(family.utf8().data(), SkFontStyle()); |
- |
- if (!typeface) |
+ sk_sp<SkTypeface> tf(fontManager->matchFamilyStyle(family.utf8().data(), SkFontStyle())); |
+ if (!tf) |
return false; |
- RefPtr<SkTypeface> tf = adoptRef(typeface); |
SkTypeface::LocalizedStrings* actualFamilies = tf->createFamilyNameIterator(); |
bool matchesRequestedFamily = false; |
SkTypeface::LocalizedString actualFamily; |