LibWeb/XHR: Don't construct a String from a String
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

Serializing a URL already returns a String.
This commit is contained in:
Shannon Booth 2025-07-12 13:18:16 +12:00 committed by Tim Ledbetter
commit 79293a3cbc
Notes: github-actions[bot] 2025-07-12 01:58:51 +00:00

View file

@ -1289,8 +1289,7 @@ String XMLHttpRequest::response_url()
if (!m_response->url().has_value())
return String {};
auto serialized = m_response->url().value().serialize(URL::ExcludeFragment::Yes);
return String::from_utf8_without_validation(serialized.bytes());
return m_response->url().value().serialize(URL::ExcludeFragment::Yes);
}
}