AK+Everywhere: Use Optional for URLParser::parse's base_url parameter

This commit is contained in:
networkException 2023-04-11 14:53:40 +02:00 committed by Linus Groh
parent 38bdf4d159
commit 9915fa72fb
Notes: sideshowbarker 2024-07-17 08:25:15 +09:00
12 changed files with 31 additions and 32 deletions

View file

@ -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())