mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:25:07 +00:00
AK+Everywhere: Use Optional for URLParser::parse's base_url parameter
This commit is contained in:
parent
38bdf4d159
commit
9915fa72fb
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