Skip to content

[browser] atob polyfil for feature detection in V8#130142

Merged
pavelsavara merged 4 commits into
dotnet:mainfrom
pavelsavara:fix-v8
Jul 10, 2026
Merged

[browser] atob polyfil for feature detection in V8#130142
pavelsavara merged 4 commits into
dotnet:mainfrom
pavelsavara:fix-v8

Conversation

@pavelsavara

Copy link
Copy Markdown
Member

No description provided.

@pavelsavara pavelsavara self-assigned this Jul 2, 2026
Copilot AI review requested due to automatic review settings July 2, 2026 20:55
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm labels Jul 2, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

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 adjusts the browser/wasm JavaScript loader’s polyfill initialization to add an atob fallback for shell (V8/d8) scenarios used during engine feature detection, and updates various V8 invocation scripts/comments to stop passing --experimental-wasm-exnref.

Changes:

  • Split/rename polyfill initialization into “early” vs “loader” phases and add an atob polyfill for shell environments.
  • Remove --experimental-wasm-exnref from V8/Node invocation in wasm sample and generated run-v8 script.
  • Update pipeline comments referencing the Helix V8 limitation.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/native/libs/Common/JavaScript/loader/run.ts Renames the loader polyfill entrypoint call to initPolyfillsLoader().
src/native/libs/Common/JavaScript/loader/polyfills.ts Adds shell atob polyfill and renames polyfill init functions.
src/native/libs/Common/JavaScript/loader/dotnet.ts Switches early polyfill initialization to initPolyfillsEarly().
src/mono/sample/wasm/wasm.mk Removes --experimental-wasm-exnref from sample run commands.
src/mono/sample/wasm/console-v8/Wasm.Console.V8.Sample.csproj Removes --experimental-wasm-exnref from the V8 XHarness run command.
src/mono/browser/build/BrowserWasmApp.targets Updates generated run-v8.sh to no longer pass --experimental-wasm-exnref.
eng/pipelines/runtime-linker-tests.yml Updates comment wording about Helix V8 “exnref” support.
eng/pipelines/performance/runtime-wasm-perf.yml Updates comment wording about V8 “exnref” support.
eng/pipelines/common/templates/wasm-runtime-tests.yml Updates comment wording about V8 “exnref” support.

Comment thread src/native/libs/Common/JavaScript/loader/polyfills.ts
Comment thread src/mono/browser/build/BrowserWasmApp.targets
Comment thread eng/pipelines/common/templates/wasm-runtime-tests.yml
@lewing lewing marked this pull request as ready for review July 6, 2026 18:01
Copilot AI review requested due to automatic review settings July 6, 2026 18:01
@lewing lewing requested review from akoeplinger and maraf as code owners July 6, 2026 18:01
@lewing

lewing commented Jul 6, 2026

Copy link
Copy Markdown
Member

/ba-g untracked failures are unrelated

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

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Comment thread src/native/libs/Common/JavaScript/loader/polyfills.ts
Comment thread src/native/libs/Common/JavaScript/loader/polyfills.ts
Comment thread src/mono/browser/build/BrowserWasmApp.targets
Comment thread src/mono/browser/runtime/loader/polyfills.ts
exnref is no longer experimental in current V8 versions, so the flag
is unrecognized and produces warnings. Remove it from all remaining
runner templates, test execution targets, the Node sample, and docs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pavelsavara

Copy link
Copy Markdown
Member Author

/ba-g unrelated failures

@pavelsavara pavelsavara merged commit 1b94594 into dotnet:main Jul 10, 2026
203 of 210 checks passed
@pavelsavara pavelsavara deleted the fix-v8 branch July 10, 2026 16:12
lewing pushed a commit that referenced this pull request Jul 11, 2026
…30511)

Fixes #129849

## Background

The exnref migration (#129851) exposed CI failures on the WASM legs. 
#130142 fixed — `wasm-feature-detect`'s `exceptionsFinal()` used `atob`.

## Changes

**Bump the Linux Helix WebAssembly image to an exnref-capable V8**
- `ubuntu-26.04-helix-webassembly-amd64` → `@sha256:73db6e43…` (V8
**15.2.47**, verified locally by pulling the image and running `d8`).
Previous pin baked V8 15.0.243.
- Updated in `eng/pipelines/coreclr/templates/helix-queues-setup.yml`
and `eng/pipelines/libraries/helix-queues-setup.yml`.
- The Windows Helix digests and the azurelinux build container (V8
15.1.103) were already current, so they are unchanged.

**Re-enable the CI legs disabled against this issue**
- `eng/pipelines/common/templates/wasm-runtime-tests.yml` — removed
`sendToHelix: false` (Mono runtime tests run on Helix again).
- `eng/pipelines/runtime-linker-tests.yml` — removed
`SkipTrimmingTestsRun=true` (trimming tests execute on V8 again).
- `eng/pipelines/performance/runtime-wasm-perf.yml` — restored the
original `pr:` trigger (was `pr: none`).
- `eng/pipelines/runtime.yml` — re-enabled the CoreCLR `WasmTestOnV8`
smoke scenario.

**Harden the Chrome/V8 auto-updater**
- `src/tasks/WasmBuildTasks/UpdateChromeVersions.cs` — add a
minimum-version guard so a Chrome-milestone-derived V8 can no longer
silently downgrade the pinned `*_V8Version` below the exnref floor
(15.1.103), which had already reverted the pins once via the automated
bump. When the recomputed value would drop below the floor, the existing
version is kept (mirroring the existing CDN-unavailable fallback).
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants