You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prevent reload realm barriers from stalling behind retired async work #850
The exact full-V8 navigation realm gate stalled on the first top-level replacement while a retired iframe/top-level fetch remained blocked in the host loader. The replacement was accepted, but the fresh realm could not service a trivial binary invocation.
Investigation localized the stall to cancel_detached_frame_context_tasks: erasing a pending fetch destroyed its std::async future while the isolate was held. The future destructor waits for the blocked loader, so cancellation synchronously blocked navigation. Full-realm teardown also built a weak wrapper graph that was immediately discarded later in the same retirement path.
Fix scope
cancel retired-context fetches and clear their V8 context/resolver handles without destroying unfinished futures;
let the ordinary ready-task drain reap cancelled host loads after completion;
during full-realm retirement, run disconnect reactions and register detached roots for native reclamation without building redundant weak wrapper graphs;
include the replacement index in barrier diagnostics.
Acceptance
all 31 replacement realms complete with the host fetch deliberately blocked;
storage/cookies survive or isolate according to origin;
stale globals/listeners/styles are absent;
the first replacement remains below 250 ms and total replacements below 10 seconds;
cancelled loads introduce no polling or idle wake loop.
Implementation
Implemented on fix/reload-realm-retirement-850 in commit 9f3fa40f. The focused full-V8 gate completed 31 replacements in 75 ms with unchanged heap and listener counts.
Activity