#53294: fix: crash in webRequest proxy for redirected CORS preflights and frameless factories
Merged
Created: Aug 28, 2026, 6:58:11 PM
Merged: Aug 29, 2026, 12:50:56 AM
4 comments
Target: main
Description of Change
- Returning
{ redirectURL }from asession.webRequest.onBeforeRequestlistener for a CORS preflight request crashed the main process; the preflight now fails instead (redirecting a preflight is not supported), matching the upstream extensions implementation this code is derived from. - With an extension that has the
webRequestpermission loaded and nosession.webRequestlisteners registered,net.fetch()/net.request()from the main process crashed because the frameless URL loader factory was handed to the extensions WebRequest layer as a navigation factory. Main-process factories now stay on Electron's own proxy. - Adds a crash-case fixture for each.
Checklist
- PR description included
-
npm testpasses - tests are changed or added
Release Notes
Notes: Fixed crashes in the main process when a webRequest.onBeforeRequest listener redirected a CORS preflight request, and when calling net.fetch() with a webRequest-permission extension loaded.
Backports
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