1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

LibTextCodec: Don't allocate Strings on encoding normalisation

This ripples down to LibWeb's HTML and XHR decoders, which therefore
become less allocation heavy.
This commit is contained in:
Hendiadyoin1 2022-03-21 00:09:28 +01:00 committed by Andreas Kling
parent 820e03e8d4
commit 6a95df2526
6 changed files with 48 additions and 48 deletions

View file

@ -207,7 +207,7 @@ MimeSniff::MimeType XMLHttpRequest::get_response_mime_type() const
}
// https://xhr.spec.whatwg.org/#final-charset
Optional<String> XMLHttpRequest::get_final_encoding() const
Optional<StringView> XMLHttpRequest::get_final_encoding() const
{
// 1. Let label be null.
Optional<String> label;