mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 03:37:35 +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:
parent
820e03e8d4
commit
6a95df2526
6 changed files with 48 additions and 48 deletions
|
@ -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;
|
||||
|
|
|
@ -78,7 +78,7 @@ private:
|
|||
void fire_progress_event(const String&, u64, u64);
|
||||
|
||||
MimeSniff::MimeType get_response_mime_type() const;
|
||||
Optional<String> get_final_encoding() const;
|
||||
Optional<StringView> get_final_encoding() const;
|
||||
MimeSniff::MimeType get_final_mime_type() const;
|
||||
|
||||
String get_text_response() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue