Skip to content

Reduce scope of WTF_ALLOW_UNSAFE_BUFFER_USAGE macros in WTF::BitVector #47306

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 cdumez self-assigned this Jun 27, 2025
@cdumez cdumez marked this pull request as ready for review June 27, 2025 19:23
Comment on lines 141 to 143
WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN
return !!(bits()[bit / bitsInPointer()] & (static_cast<uintptr_t>(1) << (bit & (bitsInPointer() - 1))));
WTF_ALLOW_UNSAFE_BUFFER_USAGE_END
Copy link
Member

Choose a reason for hiding this comment

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

Surprised by the indentation. I’d expect either fully left aligned, or nested inside the braces, perhaps with the code indented. Haven’t seen this style before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll double check I thought this was the style we were using. It's also possible WTF_ALLOW_UNSAFE_BUFFER_USAGE macros are currently inconsistent with other macros in this regard.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh never mind, it's hard reading a diff. This is meant to be fully left-aligned, always. I'll fix.

@cdumez cdumez force-pushed the 295109_BitVector_safe_buffers branch from 76ff52e to 06e60a3 Compare June 27, 2025 20:42
@cdumez cdumez added the merge-queue Applied to send a pull request to merge-queue label Jun 27, 2025
https://bugs.webkit.org/show_bug.cgi?id=295109

Reviewed by Darin Adler.

* Source/WTF/wtf/BitVector.cpp:
* Source/WTF/wtf/BitVector.h:

Canonical link: https://commits.webkit.org/296751@main
@webkit-commit-queue webkit-commit-queue force-pushed the 295109_BitVector_safe_buffers branch from 06e60a3 to 6852d68 Compare June 27, 2025 21:41
@webkit-commit-queue
Copy link
Collaborator

Committed 296751@main (6852d68): https://commits.webkit.org/296751@main

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

@webkit-commit-queue webkit-commit-queue merged commit 6852d68 into WebKit:main Jun 27, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 27, 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.

4 participants