Skip to content

Browser service: a live out-of-process frame's session is forgotten on Page.frameDetached with reason "swap" #629

Backlog

Description

@SSFSKIM

What happens. Right after an out-of-process frame auto-attaches, Chrome reports Page.frameDetached for it with reason: "swap", while the frame's target stays alive. cua's controller (src/browser-service/cdp.mjs handleFrameDetached, ported from the vendor) ignores the reason and drops the frame's session from its frame-session maps. A later read in that frame then has to attach its target again. #620's iframe runs saw it on every pass (Chrome for Testing 158, Linux; docs/evidence/2026-11-29-chrome158-unbuffered-input/).

Why it matters. It costs an extra attach on the first read in such a frame, and the controller's view of the tab's frames is wrong in the meantime. #620's input readying keeps its own registry, fed by Target.attachedToTarget/detachedFromTarget, so it isn't affected; the frame-session maps are.

To do. Keep the session on a swap. A swap means the frame moved to a new process, not that it's gone; Target.detachedFromTarget is the real end. Then check whether the vendor's service does the same: if it does, it's a parity point to declare.

Relates #620. Registered by the coordinator from linux171's body (ruling 1317).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P3status:ready-for-implementer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions