Retain native DOM, Blob, AbortSignal and intrinsic interface backing while
JavaScript still holds a retired realm. Retire active execution resources and
trace wrapper and traversal-filter ownership through V8 so the last reference
releases the native host without Rust-to-V8 root cycles.
Cover retained native values, realm finalizers and traversal callback lifetimes.
Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
Own callback microtask nesting in with_webidl_callback_contexts so operation
lookup, invocation, and return conversion share one boundary. Exit the
incumbent scope before Scoped-policy checkpoints and preserve Auto timing.
Route scripts, functions, modules, and constructors through named renderer
entry points, including worker execution. Keep the generic scope helper
private and remove manual callback wrappers from callers.
Cover microtask policies, exception cleanup, and incumbent cleanup ordering
with regression tests. Guard script and module execution entry points with
the existing source inventory checks.
Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast