fix(script): keep parser async work runnable after EOF

Async scripts still fetching at parser EOF previously entered a queue
behind DOMContentLoaded, allowing a slow defer script to block a ready
async script or its error event. Transfer remaining async work to the
exact Document runtime producer and publish each task when its source
completes, retaining its load-delay lease.

Preserve observed async completion order across parser handoff. Add gated
success, failure, and out-of-order completion tests, and update the WPT
ledger for execution-timing/085.html.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17,879 passed, 13 skipped
- 270 WPT cases: 257 to 258 passes, no case or subtest regressions
This commit is contained in:
ldm0
2026-11-02 06:01:33 +08:00
parent 638639ca61
commit 3db18870d9
2 changed files with 3 additions and 1 deletions
@@ -59,7 +59,6 @@ content-security-policy/resource-hints/prefetch-allowed-with-conflicting-permiss
content-security-policy/resource-hints/prefetch-generate-directives.html
content-security-policy/resource-hints/prefetch-no-csp.html
content-security-policy/sandbox/autoplay-disabled-by-csp.html
content-security-policy/script-src/non-nonceable-elements.html
content-security-policy/script-src/script-src-trusted_types_eval_DedicatedWorker.html
content-security-policy/securitypolicyviolation/blockeduri-inline.html
content-security-policy/unsafe-eval/eval-blocked-in-about-blank-iframe.html
+3
View File
@@ -39,6 +39,9 @@ mod parser_preparation;
#[path = "scripts/lifecycle_task_order.rs"]
mod lifecycle_task_order;
#[path = "scripts/post_parse_async.rs"]
mod post_parse_async;
fn diagnostic_global<'a>(
page: &'a moli_core::page::Page,
name: &str,