Skip to content
  • mitz@apple.com's avatar
    Reviewed by Darin Adler. · f6ca06d8
    mitz@apple.com authored
            - fix <rdar://problem/6057650> REGRESSION (r35025): Crash beneath FontCache::invalidate() when activating Safari with no windows open
    
            * css/CSSFontFaceSource.cpp:
            (WebCore::CSSFontFaceSource::getFontData): Added a null check because
            docLoader() can return 0 now.
            * css/CSSFontSelector.cpp:
            (WebCore::CSSFontSelector::docLoader): Added a null check of m_document.
            (WebCore::CSSFontSelector::addFontFaceRule): Ditto.
            (WebCore::CSSFontSelector::fontLoaded): Ditto.
            (WebCore::CSSFontSelector::fontCacheInvalidated): Ditto.
            (WebCore::fontDataForGenericFamily): Added a null check of document.
            * css/CSSFontSelector.h:
            (WebCore::CSSFontSelector::clearDocument): Added.
            * css/CSSStyleSelector.cpp:
            (WebCore::CSSStyleSelector::~CSSStyleSelector): Added a call to
            CSSFontSelector::clearDocument(). When the style selector is destroyed,
            there is no guarantee that the document will continue to exist.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@35047 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f6ca06d8