Skip to content

Stop using UncheckedKey containers in WebCore/bindings #47376

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 30, 2025

b5b9938

Stop using UncheckedKey containers in WebCore/bindings
https://bugs.webkit.org/show_bug.cgi?id=295205

Reviewed by Anne van Kesteren.

Stop using UncheckedKey containers in WebCore/bindings, for safety.
This tested as performance neutral on Speedometer.

* Source/WebCore/bindings/js/DOMWrapperWorld.h:
* Source/WebCore/bindings/js/JSDOMConvertRecord.h:
* Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::createCrossOriginFunction):
(WebCore::JSDOMGlobalObject::createCrossOriginGetterSetter):
* Source/WebCore/bindings/js/JSDOMGlobalObject.h:
* Source/WebCore/bindings/js/ScriptCachedFrameData.h:
* Source/WebCore/bindings/js/ScriptController.h:
* Source/WebCore/bindings/js/ScriptModuleLoader.h:
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::transferArrayBuffers):
(WebCore::containsDuplicates):
(WebCore::canOffscreenCanvasesDetach):
(WebCore::canDetachRTCDataChannels):
(WebCore::canDetachMediaStreamTracks):
(WebCore::canDetachMediaSourceHandles):
(WebCore::SerializedScriptValue::create):
* Source/WebCore/bindings/js/WebCoreJSClientData.h:
* Source/WebCore/bindings/js/WindowProxy.h:

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

fe2ed6e

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
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@cdumez cdumez self-assigned this Jun 30, 2025
@cdumez cdumez added the Bindings For bugs related to the DOM bindings label Jun 30, 2025
@cdumez cdumez requested review from darinadler, rniwa and annevk June 30, 2025 15:26
@cdumez cdumez added the merge-queue Applied to send a pull request to merge-queue label Jun 30, 2025
https://bugs.webkit.org/show_bug.cgi?id=295205

Reviewed by Anne van Kesteren.

Stop using UncheckedKey containers in WebCore/bindings, for safety.
This tested as performance neutral on Speedometer.

* Source/WebCore/bindings/js/DOMWrapperWorld.h:
* Source/WebCore/bindings/js/JSDOMConvertRecord.h:
* Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::createCrossOriginFunction):
(WebCore::JSDOMGlobalObject::createCrossOriginGetterSetter):
* Source/WebCore/bindings/js/JSDOMGlobalObject.h:
* Source/WebCore/bindings/js/ScriptCachedFrameData.h:
* Source/WebCore/bindings/js/ScriptController.h:
* Source/WebCore/bindings/js/ScriptModuleLoader.h:
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::transferArrayBuffers):
(WebCore::containsDuplicates):
(WebCore::canOffscreenCanvasesDetach):
(WebCore::canDetachRTCDataChannels):
(WebCore::canDetachMediaStreamTracks):
(WebCore::canDetachMediaSourceHandles):
(WebCore::SerializedScriptValue::create):
* Source/WebCore/bindings/js/WebCoreJSClientData.h:
* Source/WebCore/bindings/js/WindowProxy.h:

Canonical link: https://commits.webkit.org/296798@main
@webkit-commit-queue webkit-commit-queue force-pushed the 295205_bindings_checked_hashmaps branch from fe2ed6e to b5b9938 Compare June 30, 2025 16:06
@webkit-commit-queue
Copy link
Collaborator

Committed 296798@main (b5b9938): https://commits.webkit.org/296798@main

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

@webkit-commit-queue webkit-commit-queue merged commit b5b9938 into WebKit:main Jun 30, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bindings For bugs related to the DOM bindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants