LibURL+LibWeb: Make URL::serialize return a String

Simplifying a bunch of uneeded error handling around the place.
This commit is contained in:
Shannon Booth 2024-12-03 22:31:33 +13:00 committed by Sam Atkins
parent d7ac0601ab
commit 0fa54c2327
Notes: github-actions[bot] 2024-12-04 16:48:13 +00:00
52 changed files with 88 additions and 103 deletions

View file

@ -628,7 +628,7 @@ public:
// would have resulted from parsing the URL specified by candidate's src attribute's value relative to the
// candidate's node document when the src attribute was last changed.
auto url_record = m_candidate->document().parse_url(candiate_src);
auto url_string = MUST(url_record.to_string());
auto url_string = url_record.to_string();
// 4. ⌛ If urlString was not obtained successfully, then end the synchronous section, and jump down to the failed
// with elements step below.
@ -875,7 +875,7 @@ WebIDL::ExceptionOr<void> HTMLMediaElement::select_resource()
// 3. ⌛ If urlString was obtained successfully, set the currentSrc attribute to urlString.
if (url_record.is_valid())
m_current_src = MUST(url_record.to_string());
m_current_src = url_record.to_string();
// 4. End the synchronous section, continuing the remaining steps in parallel.