MarshallOfSound

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

Merged
Created: Jun 10, 2026, 10:39:11 AM
Merged: Jun 10, 2026, 2:25:31 PM
6 comments
Target: main

Fixes #51950

Description of Change

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 Node bump, the flag was restored but that gate was not.

As a result, Node.js unconditionally overrode Blink's WebAssembly streaming callback in renderer and worker processes — where we pass --no-experimental-fetch and never register Node's JS-side streaming implementation. Any WebAssembly.compileStreaming() / instantiateStreaming() call in a renderer with nodeIntegration: true then failed the CHECK(!impl.IsEmpty()) assertion in node_wasm_web_api.cc and crashed the renderer.

This restores the gate (matching the v24.15.0 behavior) so Blink's streaming callback stays installed in processes where Node's fetch is disabled, and adds a regression test. Browser, utility, and ELECTRON_RUN_AS_NODE processes are unaffected — fetch is enabled there, so Node's streaming implementation is still installed.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • tests are added/changed

Release Notes

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

Backports

41-x-y
Pending
Waiting for a manual backport
42-x-y
Merged
PR Number
#51956
Merged At
Jun 10, 2026, 8:59:17 PM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#51955
Merged At
Jun 10, 2026, 6:43:11 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron