8000 fix: DesktopCapturer gc'd prior to capture completion by trop[bot] · Pull Request #28281 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

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

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 recently label Mar 18, 2021
@trop trop bot added 12-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 recently label Mar 18, 2021
@zcbenz zcbenz merged commit c19e1ee into 12-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/12-x-y-bp-fix-desktopcapturer-gc-d-prior-to-capture-completion-1616100307165 branch March 22, 2021 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
12-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.

2 participants
0