Skip to content

Preserve navigated iframe WindowProxy messaging - #424

Merged
wieslawsoltes merged 1 commit into
mainfrom
fix/81-extension-host-bootstrap
Sep 18, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
fix/81-extension-host-bootstrap

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

The unchanged VS Code OSS browser extension host loads webWorkerExtensionHostIframe.html?&vscodeWebWorkerExtHostId=..., rejects its bootstrap message unless event.source === iframe.contentWindow, and sends Worker configuration back through that stable window proxy. WebScene exposed the iframe's replaced inner Window as the message source and routed proxy postMessage() to the owner context, so the handshake stopped before Worker construction and MessagePort transfer.

This change materializes the stable same-origin iframe WindowProxy before child script runs, captures it as MessageEvent.source, and routes messages sent through it to the iframe's current inner context. The focused regression executes the fetched query-bearing iframe, module Worker creation, transferred-port identity, and round trip across 20 teardown cycles.

Validation:

  • focused native CTest: pass in 3.13 s after rebasing onto 54fd7132
  • native WebPlatformSubset: 1/1 document and 7/7 assertions pass in 94 ms
  • Chrome 153 oracle: 1/1 document and 7/7 assertions pass in 102 ms
  • lifecycle gate: 20 cycles, p95 156.10 ms, max 156.63 ms
  • low-memory gate: V8 used heap returned to its baseline; native nodes/wrappers and RSS stayed within their budgets
  • adjacent 100-cycle iframe navigation lifecycle gate passes

Closes #421. Advances #81 and #227.

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.

Run query-bearing iframe Worker bootstrap after document fetch

1 participant