codebytere

#47434: fix: crash calling Fetch.continueResponse with WebContentsView

Merged
Created: Jun 10, 2025, 6:10:33 AM
Merged: Jun 11, 2025, 8:43:47 AM
4 comments
Target: main

Description of Change

Closes #46109

Fixes an issue where calling Fetch.continueResponse via debugger with WebContentsView could cause a crash. Some light investigation showed that RenderFrameDevToolsAgentHost::{Connect|Disconnect}WebContents() relied on the primary main frame of the passed webContents to attach, but it might be the case that the RenderFrameHost at hand is not in its primary main frame. If the new RenderFrameHost is not the primary main frame, we don't want to reconnect otherwise we'll end up potentially trying to reconnect to a RenderFrameHost that already has a DevToolsAgentHost associated with it.

See also this known bug in Chromium.

Checklist

Release Notes

Notes: Fixed an issue where calling Fetch.continueResponse via debugger with WebContentsView could cause a crash.

Backports

35-x-y
Merged
PR Number
#47443
Merged At
Jun 11, 2025, 1:19:39 PM
Released In
Not yet
Release Date
Not yet
36-x-y
Merged
PR Number
#47442
Merged At
Jun 11, 2025, 4:28:42 PM
Released In
v36.5.0
Release Date
Jun 17, 2025, 3:38:08 PM
37-x-y
Merged
PR Number
#47444
Merged At
Jun 11, 2025, 12:25:19 PM
Released In
v37.0.0-beta.5
Release Date
Jun 12, 2025, 8:31:22 AM

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