Skip to content

[wasm] ESM exnref global exports stay in TDZ - #62353

Open
chicoxyzzy wants to merge 1 commit into
web-platform-tests:masterfrom
chicoxyzzy:wasm-exnref-tdz
Open

chicoxyzzy wants to merge 1 commit into
web-platform-tests:masterfrom
chicoxyzzy:wasm-exnref-tdz

Conversation

@chicoxyzzy

Copy link
Copy Markdown
Contributor

Sibling of v128-tdz.tentative.any.js.

ToJSValue cannot represent exnref (it asserts the value is not ref.exn). ExecuteModule only names v128 when leaving a namespace binding uninitialized, but initializing an exnref export would be illegal. The binding stays in TDZ (ReferenceError on access), same as v128.

Instance.exports is unchanged (still a WebAssembly.Global).

Checked against WebKit: import of these modules throws ReferenceError on the export names.

How to check:

  • import { exnrefExport } from "./exnref-export.wasm" → ReferenceError
  • re-export through another Wasm module → same
  • instance.exports.exnrefExport is still a WebAssembly.Global (not asserted here)

ToJSValue cannot represent exnref. ExecuteModule leaves those
namespace bindings uninitialized, same as v128.

This branch has not been deployed

No deployments
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