Commit Graph
10 Commits
Author SHA1 Message Date
ldm0 170190c4e0 fix(lifecycle): order defer timers before DOMContentLoaded 2026-11-22 02:01:46 +08:00
ldm0 03776063e6 feat(fetch): add event-loop idle wait mode
Wait for user timers, native async operations, dedicated workers, WebSockets and receiving MessagePorts using their existing resource owners and Page task sources. Finish a microtask checkpoint before observing exhaustion, drain terminal callbacks, and follow replacement navigations through the shared idle wait driver.

Apply the existing absolute timeout to idle readiness and recheck after automation scripts. Keep internal AbortSignal timeouts and transferable-stream plumbing from independently retaining the loop. Add CLI and native observer regressions.
2026-11-15 00:48:02 +08:00
ldm0 dbdcbec7ba fix(timers): enforce stored deadlines
A one-millisecond timer could become runnable immediately after registration.
Remove the early dispatch allowance from the shared scheduler so registered
and rescheduled timers become runnable only at or after their actual
monotonic deadline. All readiness queries use the same rule.

Regression coverage checks registration-time and pre-deadline queries,
exact-deadline dispatch through filtered and unfiltered paths, and interval
rescheduling without advancing the new deadline.
2026-10-04 01:38:57 +08:00
ldm0 2fc3c71030 fix(idle): align deadlines with the DOM clock
Capture each IdleDeadline's native performance time origin and subtract
coarsened timestamps in ticks. This keeps timeRemaining on the same 100us
timeline as performance.now, including when the method is borrowed from
another realm, and avoids exposing floating-point sub-tick residuals.

The recursive idle WPT regression is reproducible at 8a353fa2a: its release
parent passes 20/20 while that commit fails 20/20. That commit changed the
DOM clock from 5us to 100us without updating the raw idle deadline clock.

Add deterministic clock-bucket and expiration checks plus a native API
resolution test that fails before this fix. Clock-only release stress passes
97/100; the remaining failures expose early idle timer admission, which is
handled separately.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(19139 passed, 16 skipped).
2026-10-04 01:38:57 +08:00
ldm0 9916039eb8 fix(dom): create AbortSignals with intrinsic factories and typed arguments 2026-09-24 16:44:14 +08:00
ldm0 3bead42808 refactor(emulation): use native process-wide ICU defaults
Remove the Date/Intl wrappers, custom date parser and per-Page replay state. Keep exclusive locale/timezone ownership in a process controller and refresh existing Page and Worker isolates through generation-bound notifications and observation boundaries, including nested Inspector pauses.

Release claims on session/target/context retirement, retain native coercion and locale matching, and cover lifecycle restoration with Rust, BiDi and process-isolated CDP regressions.
2026-09-13 01:07:35 +08:00
ldm0 ae7e1067e6 fix(emulation): preserve locale and timezone semantics 2026-09-13 01:07:35 +08:00
ldm0 8a353fa2aa fix(time): use default DOM clock resolution 2026-09-09 04:34:29 +08:00
ldm0 c0e189a0fb fix(renderer): defer idle callbacks while page work is pending 2026-08-30 16:36:55 +08:00
ldm0 27b5135cb6 Public preview 2026-08-11 00:10:12 +08:00