Skip to content

Reduce use of WTF_ALLOW_UNSAFE_BUFFER_USAGE in the StringImpl.cpp #47343

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

@cdumez cdumez self-assigned this 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 28, 2025
@cdumez cdumez force-pushed the StringImpl_safe_buffers_part1 branch from 20d9e69 to 2174157 Compare June 28, 2025 21:08
@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 StringImpl_safe_buffers_part1 branch from 2174157 to 061249a Compare June 29, 2025 01:47
@cdumez cdumez marked this pull request as ready for review June 29, 2025 03:40
Comment on lines 1623 to 1624
auto bCharacters = b->span8();
for (auto [aCharacter, bCharacter] : zippedRange(a, bCharacters)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto bCharacters = b->span8();
for (auto [aCharacter, bCharacter] : zippedRange(a, bCharacters)) {
for (auto [aCharacter, bCharacter] : zippedRange(a, b->span8())) {

@cdumez cdumez force-pushed the StringImpl_safe_buffers_part1 branch from 061249a to 5d42dd3 Compare June 29, 2025 17:56
@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 merge-queue Applied to send a pull request to merge-queue labels Jun 29, 2025
https://bugs.webkit.org/show_bug.cgi?id=295162

Reviewed by Darin Adler.

Reduce use of WTF_ALLOW_UNSAFE_BUFFER_USAGE in the StringImpl.cpp, for safety.
This tested as performance neutral on Speedometer and JetStream.

* Source/WTF/wtf/text/StringImpl.cpp:
(WTF::equalInner):
(WTF::StringImpl::replace):
(WTF::equalInternal):
(WTF::equalIgnoringNullity):
* Source/WTF/wtf/text/StringImpl.h:
(WTF::equal):

Canonical link: https://commits.webkit.org/296784@main
@webkit-commit-queue webkit-commit-queue force-pushed the StringImpl_safe_buffers_part1 branch from 5d42dd3 to 8d157ca Compare June 30, 2025 01:35
@webkit-commit-queue
Copy link
Collaborator

Committed 296784@main (8d157ca): https://commits.webkit.org/296784@main

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

@webkit-commit-queue webkit-commit-queue merged commit 8d157ca 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants