[Webkit-unassigned] [Bug 282210] New: [GLib] Provide and use helper templates to convert GBytes to std::span

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 28 15:44:34 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=282210

            Bug ID: 282210
           Summary: [GLib] Provide and use helper templates to convert
                    GBytes to std::span
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aperez at igalia.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241028/bc68ca81/attachment.htm>


More information about the webkit-unassigned mailing list