Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DesktopCapturer gc'd prior to capture completion #28279

Conversation

trop[bot]
Copy link
Contributor

@trop trop bot commented Mar 18, 2021

Backport of #28273

See that PR for details.

Notes: Fixed desktopCapturer.getSources() promise result sometimes never resolving.

desktopCapture.getSources() returns a promise which should resolve
when capturing finishes. Internally it creates an instance of
DesktopCapturer which is responsible for resolving or rejecting
the promise.

Between the time DesktopCapturer starts capturing frames and when
it finishes, it's possible for its handle to be GC'd leading to
it never resolving.

These changes pin the instance of DesktopCapturer until it either
finishes or errors.

fixes #25595
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 18, 2021
@trop trop bot added 10-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 18, 2021
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 18, 2021
@zcbenz zcbenz merged commit 51f9712 into 10-x-y Mar 22, 2021
@release-clerk
Copy link

release-clerk bot commented Mar 22, 2021

Release Notes Persisted

Fixed desktopCapturer.getSources() promise result sometimes never resolving.

@trop trop bot deleted the trop/10-x-y-bp-fix-desktopcapturer-gc-d-prior-to-capture-completion-1616100301393 branch March 22, 2021 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants