Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9070da9a886a0ac7adbf068ae69b3c821f1a42f4
https://github.com/WebKit/WebKit/commit/9070da9a886a0ac7adbf068ae69b3c821f1a42f4
Author: Dan Blackwell <[email protected]>
Date: 2026-04-27 (Mon, 27 Apr 2026)
Changed paths:
M Source/WebCore/platform/graphics/Font.cpp
M Source/WebCore/platform/graphics/GlyphPage.h
Log Message:
-----------
[TSan] GlyphPage::s_count: use std::atomic for the debug counter
https://bugs.webkit.org/show_bug.cgi?id=313438
Reviewed by David Kilzer.
GlyphPage instances are created and destroyed on multiple threads
(font worker, main); the static s_count debug counter is a plain
unsigned, so every ctor/dtor is a data race. Make it
std::atomic<unsigned> with relaxed ordering -- it's only read by
the memory-pressure logging.
Move WEBCORE_EXPORT from s_count to count() so the atomic remains
a private implementation detail. The only external consumer
(WebCoreStatistics.mm) calls the accessor, not the raw variable.
* Source/WebCore/platform/graphics/Font.cpp:
(WebCore::GlyphPage::count):
* Source/WebCore/platform/graphics/GlyphPage.h:
(WebCore::GlyphPage::~GlyphPage):
(WebCore::GlyphPage::GlyphPage):
Canonical link: https://commits.webkit.org/312118@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications