MarshallOfSound

#49991: fix: delete temporary blink* globals after restoring Blink implementations

Merged
Created: Mar 2, 2026, 2:26:59 AM
Merged: Mar 2, 2026, 4:44:50 AM
4 comments
Target: main

ElectronRendererClient::DidCreateScriptContext (and WebWorkerObserver::WorkerScriptReadyForEvaluation) save Blink's fetch/Response/FormData/Request/Headers/EventSource as temporary globalThis.blink* properties before Node initialization (which deletes some of these when its fetch implementation is disabled). node/init.ts and worker/init.ts restore the originals from these temporaries but previously never deleted the blink* globals.

They persisted as non-standard global pollution visible to page content when contextIsolation: false — a minor Electron fingerprinting signal, and a bypass for any preload that wraps window.fetch (page can call blinkfetch() instead).

Notes: no-notes

Backports

39-x-y
Merged
PR Number
#50000
Merged At
Mar 2, 2026, 10:30:39 AM
Released In
v39.8.0
Release Date
Mar 3, 2026, 10:03:24 AM
40-x-y
Merged
PR Number
#49999
Merged At
Mar 2, 2026, 12:13:12 PM
Released In
v40.7.0
Release Date
Mar 3, 2026, 10:03:33 AM
41-x-y
Pending
Waiting for a manual backport

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