Make FontCache::invalidateAllFontCaches call invalidate on all worker FontCaches
Created attachment 446481 [details] Patch
Comment on attachment 446481 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=446481&action=review > Source/WebCore/platform/graphics/FontCache.cpp:397 > +static void callOnAllFontCaches(F function) Can we use WTF::function instead of making this entire thing a template? Is "call" really the right way to describe something that posts tasks on the run loop? > Source/WebCore/platform/graphics/FontCache.cpp:417 > +void FontCache::invalidateAllFontCaches() > +{ > + callOnAllFontCaches([](FontCache& fontCache) { > + fontCache.invalidate(); > + }); > } For the purposes that callers intend, is it OK that this posts tasks that invalidate the font caches in the future, and doesn’t finish invalidating them before returning? Should we change the name to make that clearer?
<rdar://problem/86553783>
(In reply to Darin Adler from comment #2) > Comment on attachment 446481 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=446481&action=review > > > Source/WebCore/platform/graphics/FontCache.cpp:397 > > +static void callOnAllFontCaches(F function) > > Can we use WTF::function instead of making this entire thing a template? WTF::function isn't copyable, so we can't pass it to all of the worker threads. Adding something like a thread safe refcounted wrapper doesn't seem worth it to me.
Created attachment 461188 [details] Patch
Committed 252778@main (073740c9d994): <https://commits.webkit.org/252778@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 461188 [details].