Bug 436663 - workaround crash caused by long sequence of Hebrew words. r=roc, sr=vlad, a=dveditz
git-svn-id: svn://10.0.0.236/trunk@254986 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
b5a81b9856
commit
d57fb0d2d0
@ -654,7 +654,16 @@ gfxAtsuiFontGroup::GuessMaximumStringLength()
|
||||
// but we need to be a bit careful to avoid math errors.
|
||||
PRUint32 maxAdvance = PRUint32(GetFontAt(0)->GetMetrics().maxAdvance);
|
||||
PRUint32 chars = 0x7FFF/PR_MAX(1, maxAdvance);
|
||||
return PR_MAX(1, chars);
|
||||
|
||||
PRUint32 realGuessMax = PR_MAX(1, chars);
|
||||
|
||||
// bug 436663 - ATSUI crashes on 10.5.3 with certain character sequences
|
||||
// at around 512 characters, so for safety sake max out at 500 characters
|
||||
if (gfxPlatformMac::GetPlatform()->OSXVersion() >= MAC_OS_X_VERSION_10_5_HEX) {
|
||||
realGuessMax = PR_MIN(500, realGuessMax);
|
||||
}
|
||||
|
||||
return realGuessMax;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user