Skip to content

Stop using pointers to HashMap / HashSet in TextEncodingRegistry.cpp #47345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

cdumez
Copy link
Contributor

@cdumez cdumez commented Jun 28, 2025

25c204e

Stop using pointers to HashMap / HashSet in TextEncodingRegistry.cpp
https://bugs.webkit.org/show_bug.cgi?id=295166

Reviewed by Darin Adler.

Stop using pointers to HashMap / HashSet in TextEncodingRegistry.cpp. This is a bit
of an anti-pattern since a HashMap/HashSet is already itself a pointer to a HashTable.

* Source/WebCore/PAL/pal/text/TextEncodingRegistry.cpp:
(PAL::WTF_REQUIRES_LOCK):
(PAL::japaneseEncodings):
(PAL::nonBackslashEncodings):
(PAL::isJapaneseEncoding):
(PAL::shouldShowBackslashAsCurrencySymbolIn):
(PAL::newTextCodec):
(PAL::atomCanonicalTextEncodingName):

Canonical link: https://commits.webkit.org/296783@main

815f514

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac 🛠 wpe 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ❌ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress 🧪 api-gtk
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 🧪 unsafe-merge ✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@cdumez cdumez self-assigned this Jun 28, 2025
@cdumez cdumez added the Platform Portability improvements and other general platform improvements not driven directly by site bugs. label Jun 28, 2025
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 28, 2025
@cdumez cdumez removed the merging-blocked Applied to prevent a change from being merged label Jun 29, 2025
@cdumez cdumez force-pushed the 295166_TextEncodingRegistry_maps branch from f2b1745 to 815f514 Compare June 29, 2025 01:35
@cdumez cdumez marked this pull request as ready for review June 29, 2025 03:40
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 29, 2025
@cdumez cdumez added merge-queue Applied to send a pull request to merge-queue unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed merging-blocked Applied to prevent a change from being merged merge-queue Applied to send a pull request to merge-queue labels Jun 29, 2025
https://bugs.webkit.org/show_bug.cgi?id=295166

Reviewed by Darin Adler.

Stop using pointers to HashMap / HashSet in TextEncodingRegistry.cpp. This is a bit
of an anti-pattern since a HashMap/HashSet is already itself a pointer to a HashTable.

* Source/WebCore/PAL/pal/text/TextEncodingRegistry.cpp:
(PAL::WTF_REQUIRES_LOCK):
(PAL::japaneseEncodings):
(PAL::nonBackslashEncodings):
(PAL::isJapaneseEncoding):
(PAL::shouldShowBackslashAsCurrencySymbolIn):
(PAL::newTextCodec):
(PAL::atomCanonicalTextEncodingName):

Canonical link: https://commits.webkit.org/296783@main
@webkit-commit-queue webkit-commit-queue force-pushed the 295166_TextEncodingRegistry_maps branch from 815f514 to 25c204e Compare June 30, 2025 01:31
@webkit-commit-queue
Copy link
Collaborator

Committed 296783@main (25c204e): https://commits.webkit.org/296783@main

Reviewed commits have been landed. Closing PR #47345 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 25c204e into WebKit:main Jun 30, 2025
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Portability improvements and other general platform improvements not driven directly by site bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants