mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +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
|
@ -108,7 +108,7 @@ WebIDL::ExceptionOr<Infrastructure::BodyWithType> extract_body(JS::Realm& realm,
|
|||
},
|
||||
[&](JS::Handle<DOMURL::URLSearchParams> const& url_search_params) -> WebIDL::ExceptionOr<void> {
|
||||
// Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list.
|
||||
auto search_params_string = TRY(url_search_params->to_string());
|
||||
auto search_params_string = url_search_params->to_string();
|
||||
source = MUST(ByteBuffer::copy(search_params_string.bytes()));
|
||||
// Set type to `application/x-www-form-urlencoded;charset=UTF-8`.
|
||||
type = MUST(ByteBuffer::copy("application/x-www-form-urlencoded;charset=UTF-8"sv.bytes()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue