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() #41708

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 30-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 27, 2024
@codebytere codebytere merged commit 9ebeeb4 into 30-x-y Mar 28, 2024
19 of 20 checks passed
@codebytere codebytere deleted the trop/30-x-y-bp-fix-don-t-do-self-destroy-in-libnotifynotification-dismiss--1711533246520 branch March 28, 2024 11:10
Copy link

release-clerk bot commented Mar 28, 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
30-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

1 participant