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: incorrect tray garbage collection #33040

Merged
merged 1 commit into from Feb 24, 2022
Merged

fix: incorrect tray garbage collection #33040

merged 1 commit into from Feb 24, 2022

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Feb 22, 2022

Description of Change

Closes #31564.

Fixes an issue where the Tray could get garbage collected incorrectly under some circumstances.

I bisected this to v10.0.0-nightly.20200310...v10.0.0-nightly.20200311 - which was the diff that removed the catch-all HandleScope. For some trays, this wasn't an issue - if they had a menu, for example, those are prevented from being GC'd which also prevented Tray GC. We fix this by pinning the Tray, in similar fashion to what's done with, for example, BrowserView.

Checklist

Release Notes

Notes: Fixed an issue where the Tray could get garbage collected incorrectly under some circumstances.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/15-x-y labels Feb 22, 2022
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Feb 22, 2022
@codebytere codebytere changed the title fix: tray garbage collection fix: incorrect tray garbage collection Feb 22, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 23, 2022
@codebytere
Copy link
Member Author

Failures:

iframe using HTML fullscreen API while window is OS-fullscreened can fullscreen from in-process iframes

tag requestFullscreen from webview pressing ESC should emit the leave-html-full-screen event

Are known and unrelated.

@codebytere codebytere merged commit c5a2af7 into main Feb 24, 2022
@codebytere codebytere deleted the fix-tray-gc branch February 24, 2022 19:04
@release-clerk
Copy link

release-clerk bot commented Feb 24, 2022

Release Notes Persisted

Fixed an issue where the Tray could get garbage collected incorrectly under some circumstances.

@trop
Copy link
Contributor

trop bot commented Feb 24, 2022

I have automatically backported this PR to "18-x-y", please check out #33074

@trop
Copy link
Contributor

trop bot commented Feb 24, 2022

I have automatically backported this PR to "16-x-y", please check out #33075

@trop trop bot removed the target/18-x-y label Feb 24, 2022
@trop
Copy link
Contributor

trop bot commented Feb 24, 2022

I have automatically backported this PR to "17-x-y", please check out #33076

@trop
Copy link
Contributor

trop bot commented Feb 24, 2022

I have automatically backported this PR to "15-x-y", please check out #33077

bavulapati pushed a commit to bavulapati/electron that referenced this pull request Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: tray icon disappears after several seconds even if I declare tray to be global.
4 participants