mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibWeb: Don't propogate small OOMs from URLSearchParams
Made easier now that URL percent encode after encoding is also not throwing any errors. This simplfies a bunch of error handling.
This commit is contained in:
parent
4bb211ba88
commit
df4739d7ce
Notes:
github-actions[bot]
2024-08-12 22:02:35 +00:00
Author: https://github.com/shannonbooth
Commit: df4739d7ce
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1033
Reviewed-by: https://github.com/tcl3 ✅
7 changed files with 59 additions and 77 deletions
|
@ -149,11 +149,10 @@ WebIDL::ExceptionOr<JS::Value> package_data(JS::Realm& realm, ByteBuffer bytes,
|
|||
auto entries = DOMURL::url_decode(StringView { bytes });
|
||||
|
||||
// 2. If entries is failure, then throw a TypeError.
|
||||
if (entries.is_error())
|
||||
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, entries.error().string_literal() };
|
||||
// FIXME: Spec bug? It doesn't seem possible to throw an error here.
|
||||
|
||||
// 3. Return a new FormData object whose entry list is entries.
|
||||
return TRY(XHR::FormData::create(realm, entries.release_value()));
|
||||
return TRY(XHR::FormData::create(realm, entries));
|
||||
}
|
||||
// Otherwise, throw a TypeError.
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue