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

Unified Diff: content/common/mac/font_loader.mm

Issue 969683003: Remove unnecessary variable, the creation of which can cause a crash. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mac/font_loader.mm
diff --git a/content/common/mac/font_loader.mm b/content/common/mac/font_loader.mm
index be0b530b4ee94bc8b484c02527fca4a54d759829..d829175b8a84e7bd504205d10a8a6abac09441c9 100644
--- a/content/common/mac/font_loader.mm
+++ b/content/common/mac/font_loader.mm
@@ -93,12 +93,10 @@ void FontLoader::LoadFont(const FontDescriptor& font,
result->font_id = 0;
NSFont* font_to_encode = font.ToNSFont();
- // Used only for logging.
- std::string font_name([[font_to_encode fontName] UTF8String]);
// Load appropriate NSFont.
if (!font_to_encode) {
- DLOG(ERROR) << "Failed to load font " << font_name;
+ DLOG(ERROR) << "Failed to load font " << font.font_name;
return;
}
@@ -115,7 +113,7 @@ void FontLoader::LoadFont(const FontDescriptor& font,
base::mac::CFToNSCast(base::mac::CFCastStrict<CFURLRef>(
CTFontCopyAttribute(ct_font_to_encode, kCTFontURLAttribute))));
if (![font_url isFileURL]) {
- DLOG(ERROR) << "Failed to find font file for " << font_name;
+ DLOG(ERROR) << "Failed to find font file for " << font.font_name;
return;
}
@@ -135,7 +133,7 @@ void FontLoader::LoadFont(const FontDescriptor& font,
int32 font_file_size_32 = static_cast<int32>(font_file_size_64);
if (!result->font_data.CreateAndMapAnonymous(font_file_size_32)) {
- DLOG(ERROR) << "Failed to create shmem area for " << font_name;
+ DLOG(ERROR) << "Failed to create shmem area for " << font.font_name;
return;
}
« 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