RESOLVED FIXED 282210
[GLib] Provide and use helper functions to convert GBytes to std::span
https://bugs.webkit.org/show_bug.cgi?id=282210
Summary [GLib] Provide and use helper functions to convert GBytes to std::span
Adrian Perez
Reported 2024-10-28 15:44:34 PDT
In a number of locations we use g_bytes_get_data() to immediately make a new std::span; which needs WTF_ALLOW_UNSAFE_BUFFER_USAGE_{BEGIN,END}. We could provide a convenience helper template that takes a GBytes and the item type and returns the corresponding std::span, then the unsafe std::span construction would be a controller call in a single location, making the code easier to audit.
Attachments
Adrian Perez
Comment 1 2024-10-28 15:51:13 PDT
EWS
Comment 2 2024-10-29 13:47:10 PDT
Committed 285855@main (bdeb007fd6c1): <https://commits.webkit.org/285855@main> Reviewed commits have been landed. Closing PR #35830 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2024-10-29 13:48:17 PDT
Note You need to log in before you can comment on or make changes to this bug.