summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-03-22 12:40:42 +0000
committerLinus Groh <mail@linusgroh.de>2022-03-22 18:05:25 +0000
commitcd6896d3433f236a5353d7b42fef2ae7e691dd2a (patch)
tree37784d68636d49332cce187eadf7f878016d5afb /Userland
parent2219eef2504b84fa9c785367db52b5f7b206c7ab (diff)
downloadserenity-cd6896d3433f236a5353d7b42fef2ae7e691dd2a.zip
LibWeb: Convert URL to use TRY for error propagation
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/URL/URL.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/URL/URL.cpp b/Userland/Libraries/LibWeb/URL/URL.cpp
index dff06d367c..61ba8c3d06 100644
--- a/Userland/Libraries/LibWeb/URL/URL.cpp
+++ b/Userland/Libraries/LibWeb/URL/URL.cpp
@@ -35,10 +35,9 @@ DOM::ExceptionOr<NonnullRefPtr<URL>> URL::create_with_global_object(Bindings::Wi
auto& query = parsed_url.query().is_null() ? String::empty() : parsed_url.query();
// 6. Set this’s URL to parsedURL.
// 7. Set this’s query object to a new URLSearchParams object.
- auto query_object = URLSearchParams::create_with_global_object(window_object, query);
- VERIFY(!query_object.is_exception()); // The string variant of the constructor can't throw.
+ auto query_object = MUST(URLSearchParams::create_with_global_object(window_object, query));
// 8. Initialize this’s query object with query.
- auto result_url = URL::create(move(parsed_url), query_object.release_value());
+ auto result_url = URL::create(move(parsed_url), move(query_object));
// 9. Set this’s query object’s URL object to this.
result_url->m_query->m_url = result_url;