Bug 239530 - Move true / false AtomStrings to a central location and reuse them
Summary: Move true / false AtomStrings to a central location and reuse them
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-19 21:23 PDT by Chris Dumez
Modified: 2022-04-20 21:23 PDT (History)
21 users (show)

See Also:


Attachments
Patch (14.18 KB, patch)
2022-04-19 21:24 PDT, Chris Dumez
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (14.82 KB, patch)
2022-04-19 21:55 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>