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: don't do self-destroy in LibnotifyNotification::Dismiss() #41691
Conversation
Callers of Notification::Dismiss() assume that the notification instance is not deleted after the call, but this was not the case for LibnotifyNotification: - Destroy() would get `this` deleted. - notify_notification_close() in portal environment triggers LibnotifyNotification::OnNotificationClosed(), and finally calls Destroy() This patch removes all Destroy() in Dismiss(), and adds a boolean to tell whether notify_notification_close() is running, to avoid crash under portal environment. Fixes electron#40461.
💖 Thanks for opening this pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Congrats on merging your first pull request! 🎉🎉🎉 |
Release Notes Persisted
|
I was unable to backport this PR to "27-x-y" cleanly; |
I have automatically backported this PR to "29-x-y", please check out #41707 |
I have automatically backported this PR to "30-x-y", please check out #41708 |
I have automatically backported this PR to "28-x-y", please check out #41709 |
Description of Change
Callers of
Notification::Dismiss()
assume that the notification instance is not deleted after the call, but this was not the case forLibnotifyNotification
:Destroy()
would getthis
deleted.notify_notification_close()
in portal environment triggersLibnotifyNotification::OnNotificationClosed()
, and finally callsDestroy()
This patch removes all
Destroy()
inDismiss()
, and adds a boolean to tell whethernotify_notification_close()
is running, to avoid crash under portal environment.Fixes #40461.
Checklist
npm test
passesRelease Notes
Notes: Fixed crash in Notification::Close() under libnotify 0.8.x with portal environment.