MarshallOfSound

#52113: fix: use the registering session for ProtocolResponse.url requests

Merged
Created: Jun 24, 2026, 4:35:32 PM
Merged: Jun 25, 2026, 4:07:04 PM
7 comments
Target: main

Description of Change

ProtocolResponse.session is documented as:

By default the HTTP request will reuse the current session.

In practice, when session was omitted the upstream request was always
made through session.defaultSession, regardless of which session the
protocol handler was registered on. Thread the registering browser
context through ElectronURLLoaderFactory so the upstream request
defaults to the handler's own session, as documented.

Checklist

Release Notes

Notes: Fixed ProtocolResponse.url requests being made through the default session instead of the session the protocol handler was registered on when ProtocolResponse.session was not set.

Backports

40-x-y
In-flight
PR Number
#52135
Waiting to be merged
41-x-y
In-flight
PR Number
#52134
Waiting to be merged
42-x-y
In-flight
PR Number
#52132
Waiting to be merged
43-x-y
In-flight
PR Number
#52131
Waiting to be merged

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