Changeset 147681 in webkit
- Timestamp:
- Apr 4, 2013 4:56:13 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r147675 r147681 1 2013-04-04 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 3 Regression(r147639) Causes assertion hit in HashTable 4 https://bugs.webkit.org/show_bug.cgi?id=113954 5 6 Reviewed by Benjamin Poulain. 7 8 Lookup the key in the hash table again after the recursive call to 9 getCachedFontPlatformData() as it may have altered the hash map and 10 invalidated the previous iterator we had. 11 12 No new tests, covered by existing tests. 13 14 * platform/graphics/FontCache.cpp: 15 (WebCore::FontCache::getCachedFontPlatformData): 16 1 17 2013-04-04 Eric Carlson <eric.carlson@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/FontCache.cpp
r147639 r147681 203 203 204 204 FontPlatformDataCache::AddResult result = gFontPlatformDataCache->add(key, nullptr); 205 FontPlatformDataCache::iterator it = result.iterator; 205 206 if (result.isNewEntry) { 206 result.iterator->value = createFontPlatformData(fontDescription, familyName);207 208 if (! result.iterator->value && !checkingAlternateName) {207 it->value = createFontPlatformData(fontDescription, familyName); 208 209 if (!it->value && !checkingAlternateName) { 209 210 // We were unable to find a font. We have a small set of fonts that we alias to other names, 210 211 // e.g., Arial/Helvetica, Courier/Courier New, etc. Try looking up the font under the aliased name. … … 212 213 if (!alternateName.isEmpty()) { 213 214 FontPlatformData* fontPlatformDataForAlternateName = getCachedFontPlatformData(fontDescription, alternateName, true); 215 // Lookup the key in the hash table again as the previous iterator may have 216 // been invalidated by the recursive call to getCachedFontPlatformData(). 217 it = gFontPlatformDataCache->find(key); 218 ASSERT(it != gFontPlatformDataCache->end()); 214 219 if (fontPlatformDataForAlternateName) 215 result.iterator->value = adoptPtr(new FontPlatformData(*fontPlatformDataForAlternateName));220 it->value = adoptPtr(new FontPlatformData(*fontPlatformDataForAlternateName)); 216 221 } 217 222 } 218 223 } 219 224 220 return result.iterator->value.get();225 return it->value.get(); 221 226 } 222 227
Note: See TracChangeset
for help on using the changeset viewer.