deepak1556

#51959: fix: devTools network events dropped on RenderFrameHost swap

Merged
Created: Jun 10, 2026, 3:55:40 PM
Merged: Jun 11, 2026, 3:07:31 PM
4 comments
Target: main

Description of Change

When a debugger is attached to a WebContents (e.g. via webContents.debugger), Debugger::RenderFrameHostChanged unconditionally called DisconnectWebContents followed by ConnectWebContents on every primary main-frame RenderFrameHost change.

That disconnect/reconnect round-trip resets the DevTools session's mojo receiver DevToolsSession::AttachToAgent, discarding any protocol notifications already queued on the pipe.

Since Chromium 148 enabled RenderDocument with the all-frames level by default on desktop https://chromium-review.googlesource.com/c/chromium/src/+/7534620, the main-frame RenderFrameHost now changes on every navigation, so this dropped the bulk of a page's network requests from the DevTools Network panel on each load whenever a debugger was attached.

RenderFrameDevToolsAgentHost already follows primary main-frame RenderFrameHost changes within the same WebContents on its own, so the manual reconnect is redundant. Only disconnect/reconnect when the WebContents actually changed, which the agent host does not track.

Refs microsoft/vscode#320157

Release Notes

Notes: Fixed DevTools Network panel missing most requests after navigating when webContents.debugger is attached.

Backports

42-x-y
In-flight
PR Number
#51965
Waiting to be merged
43-x-y
Merged
PR Number
#51964
Merged At
Jun 11, 2026, 8:37:37 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