Skip to content

Expose browser-shaped MessagePort EventHandler accessors #430

Closed

Description

@wieslawsoltes

Problem

MessagePort wrappers currently install onmessage and onmessageerror as own writable data properties. Browsers expose both EventHandler properties through accessors on MessagePort.prototype, with per-instance values. The shape difference blocks synchronous observation of a later handler assignment in the unchanged browser extension-host bootstrap even though iframe creation and port transfer succeed.

Parent: #81. Related lifetime owner: #288.

Current package evidence on WebScene fc71e92: extensionIframeBootstrap=true, extensionPortTransferred=true, extensionPortObserverInstalled=false, while the editor Worker reply and UI timer remain healthy. Evidence was recorded in /private/tmp/vscode-smoke-fc71e92/native-smoke.json and smoke-summary.json.

Acceptance

  • Expose onmessage and onmessageerror as configurable enumerable accessors on MessagePort.prototype, matching Chromium descriptor placement and observable assignment behavior.
  • Store handlers per MessagePort instance across Window, dedicated Worker, iframe, and transferred wrappers.
  • Preserve assignment, reassignment, null clearing, receiver identity, EventTarget listeners, queued delivery, transfer ownership, close, and termination behavior.
  • Add Chromium/WPT oracle coverage and focused native contracts.
  • Complete 100 transfer/assignment/release cycles with bounded queue, binding, heap, RSS, and latency metrics.
  • Pass the unchanged packaged extension-host observer through installation and Ready/Initialized traffic without application patches.

Activity

  1. added
    bug
    vscode-oss/planned
    on Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugvscode-oss/planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions