[webkit-reviews] review granted: [Bug 243500] Nullptr crash in FontCache::shouldAutoActivateFontIfNeeded : [Attachment 461394] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 4 10:58:51 PDT 2022

Chris Dumez <cdumez at apple.com> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 243500: Nullptr crash in FontCache::shouldAutoActivateFontIfNeeded

Attachment 461394: Patch


--- Comment #9 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 461394
  --> https://bugs.webkit.org/attachment.cgi?id=461394

View in context: https://bugs.webkit.org/attachment.cgi?id=461394&action=review

r=me with suggestion

> Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:1301
> +    return !family.isEmpty() && m_knownFamilies.add(family).isNewEntry;

Would you mind doing this a little bit earlier in the function so we avoid
unnecessarily doing a remove() from m_knownFamilies.remove() if at capacity?

More information about the webkit-reviews mailing list