mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Stop propagating small OOM errors from the Error object
This commit is contained in:
Notes:
sideshowbarker
2024-07-16 21:34:08 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/54d1f4e234 Pull-request: https://github.com/SerenityOS/serenity/pull/20972 Reviewed-by: https://github.com/awesomekling
@@ -105,7 +105,7 @@ JS::NonnullGCPtr<JS::Promise> fetch(JS::VM& vm, RequestInfo const& input, Reques
|
||||
// 3. If response is a network error, then reject p with a TypeError and abort these steps.
|
||||
if (response->is_network_error()) {
|
||||
auto message = response->network_error_message().value_or("Response is a network error"sv);
|
||||
WebIDL::reject_promise(relevant_realm, promise_capability, JS::TypeError::create(relevant_realm, message).release_allocated_value_but_fixme_should_propagate_errors());
|
||||
WebIDL::reject_promise(relevant_realm, promise_capability, JS::TypeError::create(relevant_realm, message));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user