-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://bugs.webkit.org/show_bug.cgi?id=240116 Reviewed by Darin Adler and Mark Lam. This patch puts ThreadGlobalData into Thread's m_clientData field. Thread is stored in fast TLS, so accessing to this field is quite fast compared to the current ThreadSpecific one. At the same time, this change can remove a hack in ThreadGlobalData. Previously worker thread needs to tear down ThreadGlobalData explicitly because Thread::current() can be destroyed earlier than ThreadGlobalData. In that case, EventNames etc., which accesses to AtomString's destruction can have problem because of lack of Thread::current() access. But since we now move it to Thread, we can control how it is destroyed with Thread::current() precisely, and we can explicitly destroy it before Thread::current() is fully cleared. So we do not need to call it explicitly anymore. Currently, we are calling it just to make ThreadGlobalData destroyed for debugging. * Source/WebCore/PAL/pal/ThreadGlobalData.cpp: (PAL::ThreadGlobalData::ThreadGlobalData): (PAL::ThreadGlobalData::destroy): Deleted. * Source/WebCore/PAL/pal/ThreadGlobalData.h: (PAL::ThreadGlobalData::ThreadGlobalData::cachedConverterICU): Deleted. * Source/WTF/wtf/Threading.h: (WTF::Thread::Thread): * Source/WTF/wtf/posix/ThreadingPOSIX.cpp: (WTF::Thread::destructTLS): * Source/WTF/wtf/win/ThreadingWin.cpp: (WTF::Thread::ThreadHolder::~ThreadHolder): * Source/WebCore/platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::destroy): (WebCore::ThreadGlobalData::setWebCoreThreadData): (WebCore::threadGlobalData): Canonical link: https://commits.webkit.org/250571@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
866a860
commit 04f2a2b
Showing
9 changed files
with
95 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters