Bug 281892

Summary: PAL::TextCodec::getUnencodableReplacement() should return std::span
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebCore Misc.Assignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=281917
https://bugs.webkit.org/show_bug.cgi?id=281919
Bug Depends on:    
Bug Blocks: 287119    

David Kilzer (:ddkilzer)
Reported 2024-10-21 20:50:34 PDT
PAL::TextCodec::getUnencodableReplacement() should return std::span. Currently it returns an `int` length, but two out of three uses change that into a `std::span` anyway, and the third passes `data()` and `size_bytes()` into another function as separate parameters. Found by std::span static analysis checker under development.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-10-21 20:50:53 PDT
David Kilzer (:ddkilzer)
Comment 2 2024-10-21 21:00:22 PDT
EWS
Comment 3 2024-10-22 18:15:00 PDT
Committed 285580@main (cccc626b7825): <https://commits.webkit.org/285580@main> Reviewed commits have been landed. Closing PR #35562 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.