[webkit-changes] [WebKit/WebKit] 3e4dfc: TextBreakIteratorCache shouldn't be used from work...

mattwoodrow noreply at github.com
Tue Aug 22 19:55:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3e4dfc234c15f9f98e8398e10dae9945bc160981
      https://github.com/WebKit/WebKit/commit/3e4dfc234c15f9f98e8398e10dae9945bc160981
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2023-08-22 (Tue, 22 Aug 2023)

  Changed paths:
    M Source/WTF/wtf/text/TextBreakIterator.h

  Log Message:
  -----------
  TextBreakIteratorCache shouldn't be used from worker threads.
https://bugs.webkit.org/show_bug.cgi?id=260498
<rdar://113654067>

Reviewed by David Kilzer.

An alternative here would be to have a cache per-thread, but I'm not aware of an easy way to
store thread local data from WTF currently.

This just skips the cache for non-main threads, and we can consider adding it back as needed
for performance in the future.

* Source/WTF/wtf/text/TextBreakIterator.h:
(WTF::CachedTextBreakIterator::CachedTextBreakIterator):
(WTF::CachedTextBreakIterator::~CachedTextBreakIterator):

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




More information about the webkit-changes mailing list