mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-08-01 02:06:17 -04:00
A press/click that submits a form or follows a link commits a replacement Page inside the tool call itself (finalizeAction -> awaitQueuedNavigation), freeing the Frame that Session._tool_frame_override still pointed at; finalizeAction then dereferenced it via requireFrame -> currentFrame. Any script whose press/click navigated crashed on replay. Store a frame id instead of a pointer and resolve it at every currentFrame call. The replacement page keeps the frame id (see commitPendingPage), so the same handle stays routable across the swap.