Fix a problem with the 'user-defined font' which causes the CPU to spike at 100% followed by a hang, b=147222, r+sr=bzbarsky, a=sspitzer
git-svn-id: svn://10.0.0.236/trunk@141883 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
54e2c0b4b9
commit
d4238ee014
@ -5789,6 +5789,7 @@ nsFontMetricsGTK::FindUserDefinedFont(PRUint32 aChar)
|
||||
if (mIsUserDefined) {
|
||||
FIND_FONT_PRINTF((" FindUserDefinedFont"));
|
||||
nsFontGTK* font = TryNode(&mUserDefined, aChar);
|
||||
mIsUserDefined = PR_FALSE;
|
||||
if (font) {
|
||||
NS_ASSERTION(font->SupportsChar(aChar), "font supposed to support this char");
|
||||
return font;
|
||||
|
||||
@ -811,6 +811,7 @@ nsFontMetricsOS2::FindUserDefinedFont( HPS aPS )
|
||||
{
|
||||
if (mIsUserDefined) {
|
||||
nsFontOS2* font = LoadFont( aPS, &mUserDefined );
|
||||
mIsUserDefined = PR_FALSE;
|
||||
if( font )
|
||||
return font;
|
||||
}
|
||||
|
||||
@ -5111,6 +5111,7 @@ nsFontMetricsXlib::FindUserDefinedFont(PRUnichar aChar)
|
||||
if (mIsUserDefined) {
|
||||
FIND_FONT_PRINTF((" FindUserDefinedFont"));
|
||||
nsFontXlib* font = TryNode(&mUserDefined, aChar);
|
||||
mIsUserDefined = PR_FALSE;
|
||||
if (font) {
|
||||
NS_ASSERTION(font->SupportsChar(aChar), "font supposed to support this char");
|
||||
return font;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user