mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 08:48:49 +00:00
LibWeb: Make more MimeSniff::MimeType APIs infallible
This commit is contained in:
parent
9a8db40a23
commit
88e7688940
Notes:
github-actions[bot]
2024-10-14 18:48:50 +00:00
Author: https://github.com/awesomekling
Commit: 88e7688940
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1796
14 changed files with 55 additions and 56 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue