Skip to content

[Site Isolation] Refresh the Web Inspector explainer and add a WebDriver design page - #154

Open
burg wants to merge 3 commits into
WebKit:mainfrom
burg:eng/bburg/si-docs-refresh
Open

burg wants to merge 3 commits into
WebKit:mainfrom
burg:eng/bburg/si-docs-refresh

Conversation

@burg

@burg burg commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Refreshes the Site Isolation docs for where the work stands today.

  • Deep Dive/SiteIsolation.md: status update.
  • Web Inspector/SiteIsolationExplainer.md: rewritten around where each agent lives (per-frame target, process-level aggregation, UI-process-only state). Also spells out where ProxyingNetworkAgent and ProxyingPageAgent register and release instrumentation (per-hook table), and the refcount contract: one count per hosted frame per (WebContent process, page), with Enable sent only on 0→1 and Disable only on 1→0.
  • WebDriver/SiteIsolation.md (new): a design page for WebDriver under Site Isolation, covering the client side / api side / server side split, frame-routed commands, identifiers, classic endpoints, and the WebDriver BiDi modules.

Behavior that has not landed yet is marked as in progress. The page agent's per-frame counting in enable() is under review in WebKit/WebKit#76520 (bug 327026); ProxyingNetworkAgent::enable() still counts per process and needs the same change. The WebDriver page is design prose, with no per-command status column yet.

Draft for review.

burg added 2 commits October 4, 2026 22:30
…ver design page

Reviewed by NOBODY (OOPS!).

The Site Isolation explainer had drifted from the tree: it still described Console as the
only per-frame agent, a per-process NetworkAgentProxy, a single shared Debugger as an open
risk, and a Page agent FIXME that has since been resolved. WebDriver had no Site Isolation
documentation at all, even though classic and BiDi commands hit the same routing problems
as Inspector.

Rewrite the explainer around three agent homes (per-frame target, process-level
aggregation in the UI process, UI-process-only store) and document every domain against
that model, with Done / In progress / Planned status tables kept separate from the design
prose. Timeline, ScriptProfiler, Heap, IndexedDB, and Audit move from octopus to per-frame;
only CPUProfiler and Memory stay octopus.

Add Deep Dive/WebDriver/SiteIsolation.md covering the client side / api side / server side
stack, frame-routed commands, identifiers, each classic endpoint group, and each BiDi
module. BiDi paragraphs are design prose; there is no per-command status column yet.

Add a short cross-cutting "Automation and Inspection Under Site Isolation" section to
SiteIsolation.md so the shared rules live in one place, and point at both deep dives.

No new tests, documentation only. `mkdocs build --strict` reports no new warnings.

* docs/Deep Dive/SiteIsolation.md:
* docs/Deep Dive/Web Inspector/SiteIsolationExplainer.md:
* docs/Deep Dive/WebDriver/SiteIsolation.md: Added.
…-IPC rule, mark unlanded BiDi/classic behavior

Reviewed by NOBODY (OOPS!).

The interception hooks from bug 324478 have landed: FrameNetworkAgentProxy implements them
and declines every load, and ProxyingNetworkAgent's resolution commands now report
missing-intercept errors while the configuration commands accept and discard their
arguments. Describe that instead of "is to gain hooks" and "all verbs are no-ops".

IsKnownNodeReference is still a synchronous WebContent-to-UI message, so state the
asynchronous-IPC rule as a design rule with one remaining synchronous query being removed,
in both the cross-cutting rules and the WebDriver page.

Add a short note at the top of the BiDi sections that they describe the target
architecture, and mark the classic items that are written but not yet in the tree (window
and frame reference markers, file-upload process capture, page-source frame handle,
cookie-averse delete) as in progress.

* docs/Deep Dive/SiteIsolation.md:
* docs/Deep Dive/Web Inspector/SiteIsolationExplainer.md:
* docs/Deep Dive/WebDriver/SiteIsolation.md:
@burg
burg marked this pull request as ready for review October 11, 2026 21:16
…refcount contract precise

Reviewed by NOBODY (OOPS!).

The explainer said the enableInstrumentationForProcess seam is reached from didCreateFrame,
didCreateProvisionalFrame, didCommitProvisionalFrame and didCommitProvisionalPage. That is
only true of the two agents together. ProxyingPageAgent registers the destination process at
didCreateProvisionalFrame and only releases the old process at commit, while
ProxyingNetworkAgent does nothing for a provisional frame and registers the new process at
commit. Replace the list with a per-agent table of every hook that registers or releases.

The security section said enable registers a receiver "for each process hosting a frame".
Describe the actual contract instead: a count per (WebContent process, page ID), one per
hosted frame (including a provisional frame, plus processes with no frame), with
Enable*Instrumentation sent only on 0 to 1 and Disable*Instrumentation only on 1 to 0. Note
that enable() still counts once per process on main, that bug 327026 (under review) moves
ProxyingPageAgent::enable() to per-frame counting, and that ProxyingNetworkAgent::enable()
needs the same change. Also say that disable() tears down every registration regardless of
count.

No other statements in the proxying-agent and instrumentation sections disagree with current
main. `mkdocs build --strict` reports no new warnings.

* docs/Deep Dive/Web Inspector/SiteIsolationExplainer.md:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant