Skip to content

fix: only set Node's WASM streaming callback when fetch is enabled (#…#52240

Merged
jkleinsc merged 4 commits into
41-x-yfrom
bp-fix-only-set-node-s-wasm-backport-41xy
Jul 13, 2026
Merged

fix: only set Node's WASM streaming callback when fetch is enabled (#…#52240
jkleinsc merged 4 commits into
41-x-yfrom
bp-fix-only-set-node-s-wasm-backport-41xy

Conversation

@mlaurencin

@mlaurencin mlaurencin commented Jul 2, 2026

Copy link
Copy Markdown
Member

Backport of #51953

See that PR for details.

Notes: Fixed a renderer crash when calling WebAssembly.compileStreaming() or WebAssembly.instantiateStreaming() with nodeIntegration enabled.

@mlaurencin
mlaurencin requested a review from a team as a code owner July 2, 2026 14:32
@trop trop Bot added 41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Jul 2, 2026
@electron-cation electron-cation Bot added new-pr 🌱 PR opened recently and removed new-pr 🌱 PR opened recently labels Jul 2, 2026

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you rebase and update the patch(es)?

MarshallOfSound and others added 2 commits July 2, 2026 16:27
…51953)

* fix: only set Node's WASM streaming callback when fetch is enabled

Node.js v24.16.0 removed the experimental_fetch gate around
isolate->SetWasmStreamingCallback() (nodejs/node#62759). When
fix_allow_disabling_fetch_in_renderer_and_worker_processes.patch was
rebased for the version bump, the flag was restored but the gate was
not.

As a result, Node.js unconditionally overrode Blink's WebAssembly
streaming callback in renderer and worker processes, where Electron
passes --no-experimental-fetch and skips the bootstrap file that
registers Node's JS-side streaming implementation. Any call to
WebAssembly.compileStreaming() or instantiateStreaming() in a renderer
with nodeIntegration then failed the CHECK(\!impl.IsEmpty()) assertion
in node_wasm_web_api.cc and crashed the renderer.

Restore the gate so Blink's streaming callback stays in place in
processes where Node's fetch is disabled.

Fixes #51950

* test: cover WebAssembly streaming compilation in renderers with nodeIntegration
@mlaurencin
mlaurencin force-pushed the bp-fix-only-set-node-s-wasm-backport-41xy branch from 6e93c0e to ef74fd5 Compare July 2, 2026 20:33
@dsanders11
dsanders11 requested a review from jkleinsc July 2, 2026 23:40
@jkleinsc
jkleinsc merged commit 0d93097 into 41-x-y Jul 13, 2026
142 of 144 checks passed
@release-clerk

release-clerk Bot commented Jul 13, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a renderer crash when calling WebAssembly.compileStreaming() or WebAssembly.instantiateStreaming() with nodeIntegration enabled.

@jkleinsc
jkleinsc deleted the bp-fix-only-set-node-s-wasm-backport-41xy branch July 13, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: manually backport pr that "only set Node's WASM streaming callback when fetch is enabled" to electron 41

5 participants