mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-08 12:12:53 +00:00
AK+Everywhere: Use Optional for URLParser::parse's base_url parameter
This commit is contained in:
parent
38bdf4d159
commit
9915fa72fb
Notes:
sideshowbarker
2024-07-17 08:25:15 +09:00
Author: https://github.com/networkException
Commit: 9915fa72fb
Pull-request: https://github.com/SerenityOS/serenity/pull/18287
Reviewed-by: https://github.com/linusg
12 changed files with 31 additions and 32 deletions
|
@ -121,7 +121,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Request>> Request::construct_impl(JS::Realm
|
|||
// 5. If input is a string, then:
|
||||
if (input.has<String>()) {
|
||||
// 1. Let parsedURL be the result of parsing input with baseURL.
|
||||
auto parsed_url = URLParser::parse(input.get<String>(), &base_url);
|
||||
auto parsed_url = URLParser::parse(input.get<String>(), base_url);
|
||||
|
||||
// 2. If parsedURL is failure, then throw a TypeError.
|
||||
if (!parsed_url.is_valid())
|
||||
|
@ -299,7 +299,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Request>> Request::construct_impl(JS::Realm
|
|||
// 3. Otherwise:
|
||||
else {
|
||||
// 1. Let parsedReferrer be the result of parsing referrer with baseURL.
|
||||
auto parsed_referrer = URLParser::parse(referrer, &base_url);
|
||||
auto parsed_referrer = URLParser::parse(referrer, base_url);
|
||||
|
||||
// 2. If parsedReferrer is failure, then throw a TypeError.
|
||||
if (!parsed_referrer.is_valid())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue