codebytere

#47641: fix: crash on source capture with empty thumbnail size

Merged
Created: Jul 2, 2025, 6:07:23 AM
Merged: Jul 3, 2025, 7:41:20 AM
4 comments
Target: main

Description of Change

Refs CL:5783826
Closes #47591

Fixes a crash when calling desktopCapturer.getSources with an empty thumbnail size.

DesktopMediaListBase now calls Refresh(false) after dispatching DesktopMediaListObserver::OnDelegatedSourceListSelection, so it's important not to call DesktopCapturer::HandleSuccess (which deallocates the DesktopMediaList) synchronously from OnDelegatedSourceListSelection.

Checklist

Release Notes

Notes: Fixed a crash when calling desktopCapturer.getSources with an empty thumbnail size.

Backports

36-x-y
In-flight
PR Number
#47651
Waiting to be merged
37-x-y
In-flight
PR Number
#47653
Waiting to be merged
38-x-y
In-flight
PR Number
#47652
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