ladybird/Libraries/LibWeb/HTML/Scripting
Andreas Kling 69bab13718 LibWeb: Drain microtasks after background parse completion
When parse_off_thread() completes, the result callback runs inside a
deferred_invoke, which executes outside the HTML event loop's task
model. This meant that any microtasks queued by the callback (e.g.
promise reactions from react_to_promise during module linking) were
never drained, since HTML::EventLoop::process() only performs
microtask checkpoints after executing an HTML task.

Fix this by performing an explicit microtask checkpoint after the
parse result callback. This ensures that promise reactions queued
during module linking are drained immediately.

This fixes module worker scripts timing out because their loading
promise chains would stall indefinitely.
2026-03-09 09:38:29 +01:00
..
Agent.cpp LibWeb: Split out SimilarOriginWindowAgent from HTML::Agent 2025-04-25 14:07:51 +02:00
Agent.h LibJS: Switch Agent [[CanBlock]] slot to a enum member 2025-04-25 14:07:51 +02:00
ClassicScript.cpp LibJS+LibWeb: Parse classic scripts off the main thread 2026-03-06 13:06:05 +01:00
ClassicScript.h LibJS+LibWeb: Parse classic scripts off the main thread 2026-03-06 13:06:05 +01:00
Environments.cpp LibWeb: Add non const global object getter to EnvironmentSettingsObject 2026-02-26 07:22:50 +01:00
Environments.h LibWeb: Add non const global object getter to EnvironmentSettingsObject 2026-02-26 07:22:50 +01:00
EnvironmentSettingsSnapshot.cpp LibWeb: Remove API URL character encoding 2026-01-13 13:51:32 +00:00
EnvironmentSettingsSnapshot.h LibWeb: Remove API URL character encoding 2026-01-13 13:51:32 +00:00
ExceptionReporter.cpp LibJS+LibWeb: Port interned bytecode strings to UTF-16 2025-08-14 10:27:08 +02:00
ExceptionReporter.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
Fetching.cpp LibWeb: Drain microtasks after background parse completion 2026-03-09 09:38:29 +01:00
Fetching.h LibWeb: Remove exception throwing from Fetch 2025-11-07 04:08:30 +01:00
Fetching.idl
ImportMap.cpp LibWeb: Reduce recompilation impact of DOM/Document.h 2026-02-11 20:02:28 +01:00
ImportMap.h LibJS: Use FlyString in PropertyKey instead of DeprecatedFlyString 2025-03-24 22:27:17 +00:00
ImportMapParseResult.cpp LibWeb: Visit ImportMapParseResult in HTMLScriptElement::visit_edges 2026-02-21 11:14:45 -05:00
ImportMapParseResult.h LibWeb: Visit ImportMapParseResult in HTMLScriptElement::visit_edges 2026-02-21 11:14:45 -05:00
ModuleMap.cpp LibGC+Everywhere: Factor out a LibGC from LibJS 2024-11-15 14:49:20 +01:00
ModuleMap.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
ModuleScript.cpp LibJS+LibWeb: Parse modules off the main thread 2026-03-06 13:06:05 +01:00
ModuleScript.h LibJS+LibWeb: Parse modules off the main thread 2026-03-06 13:06:05 +01:00
Script.cpp LibWeb: Make base URL of HTML::Script Optional 2025-02-19 08:01:35 -05:00
Script.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
SerializedEnvironmentSettingsObject.cpp LibWeb/HTML: Track secure context as part of Serialized{Document,Worker} 2026-02-26 07:22:50 +01:00
SerializedEnvironmentSettingsObject.h LibWeb/HTML: Track secure context as part of Serialized{Document,Worker} 2026-02-26 07:22:50 +01:00
SimilarOriginWindowAgent.cpp LibWeb: Change agent's signal_slots into a GC::RootVector 2025-11-24 12:45:22 +00:00
SimilarOriginWindowAgent.h LibWeb: Use weak references in the custom elements reaction stack 2025-12-25 20:21:37 +01:00
SyntheticRealmSettings.cpp LibWeb: Remove underlying realm from SyntheticRealmSettings 2024-11-24 15:29:47 -07:00
SyntheticRealmSettings.h LibWeb: Remove underlying realm from SyntheticRealmSettings 2024-11-24 15:29:47 -07:00
TemporaryExecutionContext.cpp
TemporaryExecutionContext.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
WindowEnvironmentSettingsObject.cpp LibWeb: Remove API URL character encoding 2026-01-13 13:51:32 +00:00
WindowEnvironmentSettingsObject.h LibWeb: Remove API URL character encoding 2026-01-13 13:51:32 +00:00
WorkerAgent.cpp LibWeb/HTML: Hook up a WorkerAgent for web workers 2025-04-25 14:07:51 +02:00
WorkerAgent.h LibWeb/HTML: Hook up a WorkerAgent for web workers 2025-04-25 14:07:51 +02:00
WorkerEnvironmentSettingsObject.cpp LibWeb: Use enum instead of bool for CanUseCrossOriginIsolatedAPIs 2026-02-13 16:47:42 +00:00
WorkerEnvironmentSettingsObject.h LibWeb: Remove Document.h include from DOMParser.h, DOMImplementation.h 2026-02-08 18:51:13 +01:00