mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
AK: Port URL username/password from DeprecatedString to String
And for cases that just need to check whether the password/username is empty, add a raw_{password,username} helper to avoid any allocation.
This commit is contained in:
parent
6b29dc3e46
commit
55a01e72ca
11 changed files with 44 additions and 39 deletions
|
@ -389,10 +389,10 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::open(String const& method_string, Stri
|
|||
if (!parsed_url.host().has<Empty>()) {
|
||||
// 1. If the username argument is not null, set the username given parsedURL and username.
|
||||
if (username.has_value())
|
||||
parsed_url.set_username(username.value().to_deprecated_string());
|
||||
MUST(parsed_url.set_username(username.value()));
|
||||
// 2. If the password argument is not null, set the password given parsedURL and password.
|
||||
if (password.has_value())
|
||||
parsed_url.set_password(password.value().to_deprecated_string());
|
||||
MUST(parsed_url.set_password(password.value()));
|
||||
}
|
||||
|
||||
// 9. If async is false, the current global object is a Window object, and either this’s timeout is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue