From 2b832fdc31905647957be0a64ff6f3886a7678d0 Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Thu, 21 Aug 2025 18:42:20 +0200 Subject: [PATCH] LibWeb/XHR: MUST handle_{errors,response_end_of_body} in async context These cannot throw in an async context and we no longer care about minor OOM errors so let's MUST these. --- Libraries/LibWeb/XHR/XMLHttpRequest.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Libraries/LibWeb/XHR/XMLHttpRequest.cpp b/Libraries/LibWeb/XHR/XMLHttpRequest.cpp index 981d3f92944..6fabab637d8 100644 --- a/Libraries/LibWeb/XHR/XMLHttpRequest.cpp +++ b/Libraries/LibWeb/XHR/XMLHttpRequest.cpp @@ -779,8 +779,7 @@ WebIDL::ExceptionOr XMLHttpRequest::send(Optionalis_network_error()) @@ -800,8 +799,7 @@ WebIDL::ExceptionOr XMLHttpRequest::send(Optionalbody()) { // NOTE: This cannot throw, as `handle_response_end_of_body` only throws in a synchronous context. - // FIXME: However, we can receive allocation failures, but we can't propagate them anywhere currently. - handle_response_end_of_body().release_value_but_fixme_should_propagate_errors(); + MUST(handle_response_end_of_body()); return; } @@ -837,8 +835,7 @@ WebIDL::ExceptionOr XMLHttpRequest::send(Optional XMLHttpRequest::send(Optional