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: don't do self-destroy in LibnotifyNotification::Dismiss() #41709

Conversation

trop[bot]
Copy link
Contributor

@trop trop bot commented Mar 27, 2024

Backport of #41691

See that PR for details.

Notes: Fixed crash in Notification::Close() under libnotify 0.8.x with portal environment.

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 #40461.

Co-authored-by: taoky <me@taoky.moe>
@trop trop bot added 28-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 27, 2024
@ckerr ckerr merged commit f4b7aa5 into 28-x-y Mar 29, 2024
17 checks passed
@ckerr ckerr deleted the trop/28-x-y-bp-fix-don-t-do-self-destroy-in-libnotifynotification-dismiss--1711533244702 branch March 29, 2024 01:50
Copy link

release-clerk bot commented Mar 29, 2024

Release Notes Persisted

Fixed crash in Notification::Close() under libnotify 0.8.x with portal environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
28-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