Skip to content

[wasm] Pass --experimental-wasm-exnref to V8 for perf runs#5247

Open
DrewScoggins wants to merge 1 commit into
dotnet:mainfrom
DrewScoggins:wasm-perf-exnref-flag
Open

[wasm] Pass --experimental-wasm-exnref to V8 for perf runs#5247
DrewScoggins wants to merge 1 commit into
dotnet:mainfrom
DrewScoggins:wasm-perf-exnref-flag

Conversation

@DrewScoggins

Copy link
Copy Markdown
Member

Problem

WASM dotnet performance runs began failing at startup:

MONO_WASM: Assert failed: This browser/engine doesn't support WASM exception handling.
main.mjs: Error: Top-level await promise never resolved

Root cause

dotnet/runtime#129851 ([browser] WASM exception handling to use the standardized exnref) switched the runtime to the standardized exnref exception-handling proposal. V8 keeps exnref behind the --experimental-wasm-exnref flag.

The perf wasm v8 leg installs V8 via jsvu (version read from the runtime's BrowserVersions.props, already at 15.1.103) and runs benchmarks through BenchmarkDotNet. BDN was not passing --experimental-wasm-exnref, so the runtime's startup feature check (exceptionsFinal) fails and the benchmark process aborts.

Fix

Pass the flag through BDN's existing --wasmArgs option for the v8 engine, on both the wasm and wasm_coreclr legs. This mirrors the previous --wasmArgs pattern removed in #5134.

No BenchmarkDotNet change is required (--wasmArgs already exists in the consumed nightly), and no separate jsvu pin change is needed (the version is authoritative from BrowserVersions.props).

Refs dotnet/runtime#129849, dotnet/runtime#129851.

The runtime switched WASM exception handling to the standardized exnref
proposal (dotnet/runtime#129851), which V8 keeps behind the
--experimental-wasm-exnref flag. The perf wasm v8 leg installs V8 via jsvu
and runs benchmarks through BenchmarkDotNet, which was not passing the flag,
so MicroBenchmarks aborts at startup with 'This browser/engine doesn't
support WASM exception handling' / 'Top-level await promise never resolved'.

Pass the flag through BDN's --wasmArgs for the v8 engine on both the wasm and
wasm_coreclr legs. Gated on v8 so JavaScriptCore is unaffected; harmless
(warning only) on V8 builds that enable exnref by default.

See dotnet/runtime#129849.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 26, 2026 19:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes failing WASM performance runs under V8 by ensuring the V8 engine is launched with support for the standardized exnref WASM exception-handling proposal (currently gated in V8 behind --experimental-wasm-exnref). This aligns the perf harness with the runtime change in dotnet/runtime#129851 so benchmark startup no longer aborts due to missing exception-handling support.

Changes:

  • Add --experimental-wasm-exnref to V8 launches by passing it through BenchmarkDotNet’s --wasmArgs option.
  • Apply the change to both wasm and wasm_coreclr runtime types.
  • Gate the behavior on javascript_engine == "v8" to avoid affecting JavaScriptCore legs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants