Bug 394384. Fix accounting error when tracking the number of times a textrun is referenced from the word cache. debug-only. r+a=pavlov

This commit is contained in:
roc+%cs.cmu.edu 2007-09-04 03:40:14 +00:00
Родитель 507e95e461
Коммит 420d80a301
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -243,9 +243,6 @@ TextRunWordCache::LookupWord(gfxTextRun *aTextRun, gfxFont *aFirstFont,
if (fontEntry->mTextRun) { if (fontEntry->mTextRun) {
existingEntry = fontEntry; existingEntry = fontEntry;
} else { } else {
#ifdef DEBUG
++aTextRun->mCachedWords;
#endif
PR_LOG(gWordCacheLog, PR_LOG_DEBUG, ("%p(%d-%d,%d): added using font", aTextRun, aStart, aEnd - aStart, aHash)); PR_LOG(gWordCacheLog, PR_LOG_DEBUG, ("%p(%d-%d,%d): added using font", aTextRun, aStart, aEnd - aStart, aHash));
key.mFontOrGroup = aTextRun->GetFontGroup(); key.mFontOrGroup = aTextRun->GetFontGroup();
CacheHashEntry *groupEntry = mCache.GetEntry(key); CacheHashEntry *groupEntry = mCache.GetEntry(key);
@ -273,6 +270,9 @@ TextRunWordCache::LookupWord(gfxTextRun *aTextRun, gfxFont *aFirstFont,
return PR_TRUE; return PR_TRUE;
} }
#ifdef DEBUG
++aTextRun->mCachedWords;
#endif
// Set up the cache entry so that if later in this textrun we hit this // Set up the cache entry so that if later in this textrun we hit this
// entry, we'll copy within our own textrun // entry, we'll copy within our own textrun
fontEntry->mTextRun = aTextRun; fontEntry->mTextRun = aTextRun;