2011-05-26 David Levin <levin@chromium.org>
authorlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 May 2011 02:16:21 +0000 (02:16 +0000)
committerlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 May 2011 02:16:21 +0000 (02:16 +0000)
commit2205a68599a12be7678e5d361d8574c1e6908f8f
treef99c62d34ffe02a4743fa24b58db90e1244db058
parent896022679db076e4c4c3a049738f7c5a643ae49c
2011-05-26  David Levin  <levin@chromium.org>

        Reviewed by Dmitry Titov.

        WebKit's font notification has problems when the WebKit main thread != UI thread.
        https://bugs.webkit.org/show_bug.cgi?id=61391

        This doesn't happen in DumpRenderTree, so it needs a unit test which is taking me
        some time to write correctly. In the meantime, this issues happens to be causing
        some crashes in Chrome so here's the fix alone for the time being.

        * platform/graphics/mac/FontCacheMac.mm:
        (WebCore::invalidateFontCache): Ensure that FontCache::invalidate is only called on WebKit's main thread.
        (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Call common function for font cache invalidation.
         Note that the call to fontCache() is fine since the singleton is initialized well before calling this function. Theoretically,
         there could be a problem due to a lack of a memory barrier but that is highly unlikely and this is debug only code.
        (WebCore::fontCacheATSNotificationCallback): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/mac/FontCacheMac.mm