To reproduce: 1. Type in Safari's address field while using a Debug build of WebKit You'll hit an assertion in FontCache::getCachedFontData: ASSERT(m_purgePreventCount); I don't know what the Release symptom is. Michael Saboff probably does. Here's the backtrace: > WebKit.dll!WebCore::FontCache::getCachedFontData(const WebCore::FontPlatformData * platformData=0x0b050218, WebCore::FontCache::ShouldRetain shouldRetain=DoNotRetain) Line 279 + 0x29 bytes C++ WebKit.dll!WebCore::FontCache::getFontDataForCharacters(const WebCore::Font & font={...}, const wchar_t * characters=0x0012f3f0, int length=1) Line 288 + 0x11 bytes C++ WebKit.dll!WebCore::Font::glyphDataForCharacter(int c=8206, bool mirror=false, WebCore::FontDataVariant variant=NormalVariant) Line 195 + 0x1e bytes C++ WebKit.dll!WebCore::WidthIterator::advance(int offset=41, WebCore::GlyphBuffer * glyphBuffer=0x00000000) Line 126 + 0x18 bytes C++ WebKit.dll!WebCore::Font::floatWidthForSimpleText(const WebCore::TextRun & run={...}, WebCore::GlyphBuffer * glyphBuffer=0x00000000, WTF::HashSet<WebCore::SimpleFontData const *,WTF::PtrHash<WebCore::SimpleFontData const *>,WTF::HashTraits<WebCore::SimpleFontData const *> > * fallbackFonts=0x00000000, WebCore::GlyphOverflow * glyphOverflow=0x00000000) Line 455 C++ WebKit.dll!WebCore::Font::width(const WebCore::TextRun & run={...}, WTF::HashSet<WebCore::SimpleFontData const *,WTF::PtrHash<WebCore::SimpleFontData const *>,WTF::HashTraits<WebCore::SimpleFontData const *> > * fallbackFonts=0x00000000, WebCore::GlyphOverflow * glyphOverflow=0x00000000) Line 190 + 0x47 bytes C++ WebKit.dll!WebCore::stringWidth(const WebCore::Font & renderer={...}, const wchar_t * characters=0x0a361484, unsigned int length=41) Line 98 + 0x10 bytes C++ WebKit.dll!WebCore::StringTruncator::width(const WTF::String & string={? Overview Python v2.7.2 documentation}, const WebCore::Font & font={...}) Line 194 + 0x1b bytes C++ WebKit.dll!WebCore::WebCoreTextFloatWidth(const WTF::String & text={? Overview Python v2.7.2 documentation}, const WebCore::Font & font={...}) Line 104 + 0xd bytes C++ WebKit.dll!TextFloatWidth(const wchar_t * text=0x0afccf54, int length=41, const WebFontDescription & description={...}) Line 126 + 0x27 bytes C++
Presumably the WebKitGraphics.cpp APIs need some FontCachePurgePreventer love.
<rdar://problem/9648668>
The release build symptom is extra memory use, with a small risk of crash sprinkled in.
Created attachment 98120 [details] Patch with additional FontCachePurgePreventer for ASSERT failure Patch includes two other additional instances of purge prevention based on code inspection. These changes are speculative.
Comment on attachment 98120 [details] Patch with additional FontCachePurgePreventer for ASSERT failure I haven't been able to cause an assertion failure involving createDragImageForLink, but this seems fine to me.
Comment on attachment 98120 [details] Patch with additional FontCachePurgePreventer for ASSERT failure I can confirm that this patch fixes the assertion I was seeing. Thanks!
Committed r89425: <http://trac.webkit.org/changeset/89425>