mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 08:48:49 +00:00
LibWeb: Remove OOM propagation from Fetch::Infrastructure::Headers
This commit is contained in:
parent
2925fcd4bc
commit
c79f46fe6f
Notes:
sideshowbarker
2024-07-17 09:47:09 +09:00
Author: https://github.com/trflynn89
Commit: c79f46fe6f
Pull-request: https://github.com/SerenityOS/serenity/pull/24124
23 changed files with 212 additions and 225 deletions
|
@ -313,7 +313,7 @@ WebIDL::ExceptionOr<void> fetch_classic_script(JS::NonnullGCPtr<HTMLScriptElemen
|
|||
}
|
||||
|
||||
// 3. Let potentialMIMETypeForEncoding be the result of extracting a MIME type given response's header list.
|
||||
auto potential_mime_type_for_encoding = response->header_list()->extract_mime_type().release_value_but_fixme_should_propagate_errors();
|
||||
auto potential_mime_type_for_encoding = response->header_list()->extract_mime_type();
|
||||
|
||||
// 4. Set character encoding to the result of legacy extracting an encoding given potentialMIMETypeForEncoding
|
||||
// and character encoding.
|
||||
|
@ -381,7 +381,7 @@ WebIDL::ExceptionOr<void> fetch_classic_worker_script(URL::URL const& url, Envir
|
|||
// 3. If all of the following are true:
|
||||
// - response's URL's scheme is an HTTP(S) scheme; and
|
||||
// - the result of extracting a MIME type from response's header list is not a JavaScript MIME type,
|
||||
auto maybe_mime_type = MUST(response->header_list()->extract_mime_type());
|
||||
auto maybe_mime_type = response->header_list()->extract_mime_type();
|
||||
auto mime_type_is_javascript = maybe_mime_type.has_value() && maybe_mime_type->is_javascript();
|
||||
|
||||
if (response->url().has_value() && Fetch::Infrastructure::is_http_or_https_scheme(response->url()->scheme()) && !mime_type_is_javascript) {
|
||||
|
@ -684,7 +684,7 @@ void fetch_single_module_script(JS::Realm& realm,
|
|||
auto source_text = TextCodec::convert_input_to_utf8_using_given_decoder_unless_there_is_a_byte_order_mark(*decoder, body_bytes.get<ByteBuffer>()).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
// 3. Let mimeType be the result of extracting a MIME type from response's header list.
|
||||
auto mime_type = response->header_list()->extract_mime_type().release_value_but_fixme_should_propagate_errors();
|
||||
auto mime_type = response->header_list()->extract_mime_type();
|
||||
|
||||
// 4. Let moduleScript be null.
|
||||
JS::GCPtr<JavaScriptModuleScript> module_script;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue