Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 21308fa925b845ce1d059459879ff397e611bb65 https://github.com/WebKit/WebKit/commit/21308fa925b845ce1d059459879ff397e611bb65 Author: Cameron McCormack <hey...@apple.com> Date: 2022-10-26 (Wed, 26 Oct 2022)
Changed paths: M Source/WebCore/css/CSSFontSelector.cpp M Source/WebCore/platform/ThreadGlobalData.cpp M Source/WebCore/platform/ThreadGlobalData.h M Source/WebCore/platform/graphics/FontCache.cpp M Source/WebCore/platform/graphics/FontCache.h M Source/WebCore/workers/WorkerOrWorkletThread.cpp Log Message: ----------- Switch FontCache to use ThreadSpecific instead of ThreadGlobalData https://bugs.webkit.org/show_bug.cgi?id=244919 Reviewed by Youenn Fablet. ThreadGlobalData doesn't handle the case where we try to access it while it's being shut down, and the font code tries to do that. ThreadSpecific should be faster, and safe for this case. * Source/WebCore/css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::~CSSFontSelector): * Source/WebCore/platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::initializeFontCache): Deleted. * Source/WebCore/platform/ThreadGlobalData.h: (WebCore::ThreadGlobalData::fontCache): Deleted. (WebCore::ThreadGlobalData::fontCacheIfExists): Deleted. (WebCore::ThreadGlobalData::fontCacheIfNotDestroyed): Deleted. * Source/WebCore/platform/graphics/FontCache.cpp: (WebCore::fontCacheForCurrentThread): (WebCore::FontCache::forCurrentThread): (WebCore::FontCache::forCurrentThreadIfExists): (WebCore::FontCache::destroy): (WebCore::FontCache::forCurrentThreadIfNotDestroyed): Deleted. * Source/WebCore/platform/graphics/FontCache.h: * Source/WebCore/workers/WorkerOrWorkletThread.cpp: (WebCore::WorkerOrWorkletThread::workerOrWorkletThread): Canonical link: https://commits.webkit.org/256048@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes