Bug 239530

Summary: Move true / false AtomStrings to a central location and reuse them
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, benjamin, changseok, cmarcelo, darin, dbarton, dino, esprehn+autocc, ews-watchlist, fmalita, fred.wang, ggaren, gyuyoung.kim, kangil.han, mifenton, pdr, sabouhallawa, sam, schenney, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=239585
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch none

Description Chris Dumez 2022-04-19 21:23:24 PDT
Move true / false AtomStrings to a central location and reuse them.
Comment 1 Chris Dumez 2022-04-19 21:24:38 PDT
Created attachment 457957 [details]
Patch
Comment 2 Chris Dumez 2022-04-19 21:55:48 PDT
Created attachment 457960 [details]
Patch
Comment 3 Chris Dumez 2022-04-20 09:15:32 PDT
Comment on attachment 457960 [details]
Patch

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

> Source/WTF/wtf/text/AtomString.cpp:140
> +WTF_EXPORT_PRIVATE MainThreadLazyNeverDestroyed<const AtomString> trueAtomData;

Alternatively, we could move true/false atoms to a new WebCore header since:
1. They are only used in WebCore
2. I suspect there are a few more global AtomStrings in WebCore that could be reused more broadly (planning to look into that in a follow up).

Please let me know what you think.
Comment 4 Sam Weinig 2022-04-20 14:52:13 PDT
Comment on attachment 457960 [details]
Patch

Seems like a fine place to me (at least as fine as the xml ones).
Comment 5 EWS 2022-04-20 16:03:19 PDT
Committed r293129 (249831@main): <https://commits.webkit.org/249831@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 457960 [details].
Comment 6 Radar WebKit Bug Importer 2022-04-20 16:04:15 PDT
<rdar://problem/92057581>