Bug 543502 followup: replace non-critical assertion in GDIFontList with optional logging. r=jdaggett

This commit is contained in:
Jonathan Kew 2010-02-18 11:52:44 +00:00
parent a36f66c45b
commit dd9376eca9

View File

@ -492,12 +492,9 @@ GDIFontFamily::FindStyleVariations()
EnumFontFamiliesExW(hdc, &logFont,
(FONTENUMPROCW)GDIFontFamily::FamilyAddStylesProc,
(LPARAM)this, 0);
#ifdef DEBUG
if (mAvailableFonts.Length() == 0) {
char msgBuf[256];
(void)sprintf(msgBuf, "no styles available in family \"%s\"",
NS_ConvertUTF16toUTF8(mName).get());
NS_ASSERTION(mAvailableFonts.Length() != 0, msgBuf);
#ifdef PR_LOGGING
if (LOG_ENABLED() && mAvailableFonts.Length() == 0) {
LOG(("no styles available in family \"%s\"", NS_ConvertUTF16toUTF8(mName).get()));
}
#endif