mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-27 03:14:15 +00:00
LibWeb/HTML: Handle failure determining mime type fetching module script
Fixes crash in WPT test: https://wpt.live/html/semantics/scripting-1/the-script-element/css-module/content-type-checking.html
This commit is contained in:
parent
caf959f06c
commit
bc4317be20
Notes:
github-actions[bot]
2025-05-31 13:16:55 +00:00
Author: https://github.com/shannonbooth
Commit: bc4317be20
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4940
1 changed files with 1 additions and 1 deletions
|
|
@ -712,7 +712,7 @@ void fetch_single_module_script(JS::Realm& realm,
|
|||
|
||||
// 7. If mimeType is a JavaScript MIME type and moduleType is "javascript", then set moduleScript to the result of creating a JavaScript module script given sourceText, moduleMapRealm, response's URL, and options.
|
||||
// FIXME: Pass options.
|
||||
if (mime_type->is_javascript() && module_type == "javascript")
|
||||
if (mime_type.has_value() && mime_type->is_javascript() && module_type == "javascript")
|
||||
module_script = JavaScriptModuleScript::create(url.basename(), source_text, module_map_realm, response->url().value_or({})).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
// FIXME: 8. If the MIME type essence of mimeType is "text/css" and moduleType is "css", then set moduleScript to the result of creating a CSS module script given sourceText and settingsObject.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue