Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5c3bc51f9e6a4c5725d11730c73ee73ec179ee2f
      
https://github.com/WebKit/WebKit/commit/5c3bc51f9e6a4c5725d11730c73ee73ec179ee2f
  Author: Vitor Roriz <[email protected]>
  Date:   2026-06-16 (Tue, 16 Jun 2026)

  Changed paths:
    M Source/WebCore/platform/graphics/FontCache.cpp

  Log Message:
  -----------
  FontCache::purgeInactiveFontData: clear shaped text caches when purging fonts

https://bugs.webkit.org/show_bug.cgi?id=317190
rdar://173222307

Reviewed by Brent Fulgham and Tim Nguyen.

GlyphBuffer holds only weak references to its Fonts (since 308842@main). A
GlyphBuffer cached in a FontCascadeFonts shaped text cache therefore does not
keep its Fonts alive, so FontCache::purgeInactiveFontData can destroy a Font
that is still referenced by a cached buffer. Currently, 
FontCascadeFonts::pruneSystemFallbacks
only flushes the shaped text caches when system fallback fonts are dropped, so 
an
inactive font purge leaves the cached buffer with a dangling weak pointer.
Therefore, let's clear the shaped text caches whenever inactive font data is 
purged.

* Source/WebCore/platform/graphics/FontCache.cpp:
(WebCore::FontCache::purgeInactiveFontData):

Canonical link: https://commits.webkit.org/315309@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to