From ef987262468556bb98e5f6b54a68757cd1f8d8ed Mon Sep 17 00:00:00 2001 From: Brad Werth Date: Mon, 3 Jan 2022 19:20:21 +0000 Subject: [PATCH] Bug 1744135 Part 4: Avoid implicit int conversion for font names. r=jfkthame Differential Revision: https://phabricator.services.mozilla.com/D134963 --- gfx/thebes/gfxMacPlatformFontList.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/thebes/gfxMacPlatformFontList.mm b/gfx/thebes/gfxMacPlatformFontList.mm index 3d89c421fc2b..1898ccc5bf8b 100644 --- a/gfx/thebes/gfxMacPlatformFontList.mm +++ b/gfx/thebes/gfxMacPlatformFontList.mm @@ -390,13 +390,13 @@ CGFontRef MacOSFontEntry::CreateOrCopyFontRef() { ::CGFontRetain(mFontRef); return mFontRef; } + + CrashReporter::AutoAnnotateCrashReport autoFontName(CrashReporter::Annotation::FontName, mName); + // Create a new CGFont; caller will own the only reference to it. NSString* psname = GetNSStringForString(NS_ConvertUTF8toUTF16(mName)); CGFontRef ref = CGFontCreateWithFontName(CFStringRef(psname)); if (!ref) { - CrashReporter::AutoAnnotateCrashReport autoFontName(CrashReporter::Annotation::FontName, - psname); - // This happens on macOS 10.12 for font entry names that start with // .AppleSystemUIFont. For those fonts, we need to go through NSFont // to get the correct CGFontRef. -- 2.11.4.GIT