From 319bb6353e0ba64fc5e54b32ddb2b38736cedef9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 18 Jul 2024 17:53:06 -0400 Subject: [PATCH] LibWeb: Fix assertion failure on telekom.de The EntryType has three possible values: Fetching, Failed or ModuleScript. It is possible that we transition from Fetching to Failed as in #13.1. Change the assertion to include the failed scenario. Fixes: https://github.com/LadybirdBrowser/ladybird/issues/661 --- Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp index c7222789f88..8ffadda10ec 100644 --- a/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp +++ b/Userland/Libraries/LibWeb/HTML/Scripting/Fetching.cpp @@ -721,7 +721,7 @@ void fetch_single_module_script(JS::Realm& realm, module_map.wait_for_change(realm.heap(), url, module_type, [on_complete, &realm](auto entry) -> void { HTML::queue_global_task(HTML::Task::Source::Networking, realm.global_object(), JS::create_heap_function(realm.heap(), [on_complete, entry] { // FIXME: This should run other steps, for now we just assume the script loaded. - VERIFY(entry.type == ModuleMap::EntryType::ModuleScript); + VERIFY(entry.type == ModuleMap::EntryType::ModuleScript || entry.type == ModuleMap::EntryType::Failed); on_complete->function()(entry.module_script); }));