Skip to content

Restore restricted parent messaging for isolated iframe realms - #895

Merged
wieslawsoltes merged 1 commit into
mainfrom
fix/isolated-parent-postmessage-894
Sep 21, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
fix/isolated-parent-postmessage-894

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

Result

An unchanged Code OSS Markdown webview loads its isolated HTTPS prelude and ServiceWorker but stops at window.parent.postMessage(...): WebScene currently gives cross-origin child realms parent=null. Restore a restricted child-realm parent/top WindowProxy that routes target-origin messages and transferred ports through the existing bounded queue while denying access to the real parent DOM/global. Keep a stable owner-side frame proxy for MessageEvent.source. Closes #894; full installed Markdown acceptance remains under #264/#267 and SceneTech/AppScene#398.

Focused gates

  • Native HTTPS child-to-parent ready message, exact sender origin/source, wrong-targetOrigin denial, MessagePort transfer and reply, nested child-to-immediate-parent relay, restricted parent.document read/write denial: 76.2577 ms < 1,000 ms.
  • Existing isolated ServiceWorker/opaque-sandbox gate: 219.654 ms; 100-cycle iframe sandbox passes; 100-cycle worker lifecycle p95 7.84092 ms, flat heap.
  • The existing iframe-navigation-lifecycle test reports reentrantUnloadBlocked:false on both this branch and a rebuilt clean merged 06d6a4f5 baseline, after all focused code/test changes were reverted. That separate merged-main behavior is tracked under Enforce secure nested-document lifecycle for Code OSS webviews #267. Related CI and exact installed SDK/CLI Markdown run remain the next gates.

Reproduction and gate details: docs/validation/isolated-parent-postmessage-894-264.md. No Code OSS source change or browser shell dependency.

@wieslawsoltes
wieslawsoltes merged commit 99cf2f8 into main Sep 21, 2026
5 of 12 checks passed
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.

Restore restricted parent postMessage in isolated iframe realms

1 participant