mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 02:40:49 +00:00
LibWeb: Make more MimeSniff::MimeType APIs infallible
This commit is contained in:
committed by
Andreas Kling
parent
9a8db40a23
commit
88e7688940
@@ -424,7 +424,7 @@ WebIDL::ExceptionOr<void> fetch_classic_worker_script(URL::URL const& url, Envir
|
||||
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) {
|
||||
auto mime_type_serialized = maybe_mime_type.has_value() ? MUST(maybe_mime_type->serialized()) : "unknown"_string;
|
||||
auto mime_type_serialized = maybe_mime_type.has_value() ? maybe_mime_type->serialized() : "unknown"_string;
|
||||
dbgln("Invalid non-javascript mime type \"{}\" for worker script at {}", mime_type_serialized, response->url().value());
|
||||
|
||||
// then run onComplete given null, and abort these steps.
|
||||
|
||||
Reference in New Issue
Block a user