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

git-svn-id: svn://10.0.0.236/trunk@233823 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu 2007-09-04 03:40:14 +00:00
parent 56332be38b
commit c0dfb9a733

View File

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