MarshallOfSound

#53665: fix: resolve the capturing webContents in setDisplayMediaRequestHandler

Merged
Created: Sep 7, 2026, 4:05:44 AM
Merged: Sep 7, 2026, 4:57:10 AM
5 comments
Target: main
  • setDisplayMediaRequestHandler: capture-handle, zoom and cross-session checks are computed against the WebContents that called getDisplayMedia(); previously this could dereference null when granting another tab by id.
  • Passing a WebFrameMain whose frame has been destroyed as video / audio throws a TypeError instead of crashing; a request whose own frame is gone fails cleanly.
  • A WebFrameMain grant captures the tab that contains the frame; the docs now say so and the example only self-captures top-level frames.

Notes: Fixed crashes in setDisplayMediaRequestHandler when the granted frame had been destroyed or another tab was granted by id.

Backports

42-x-y
Merged
PR Number
#53674
Merged At
Sep 7, 2026, 10:41:44 AM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#53671
Merged At
Sep 7, 2026, 10:41:55 AM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#53672
Merged At
Sep 7, 2026, 10:41:48 AM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#53673
Merged At
Sep 7, 2026, 10:41:50 AM
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