electron/shell/browser/notifications/linux
trop[bot] 9ebeeb40ac
fix: don't do self-destroy in LibnotifyNotification::Dismiss() (#41708)
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: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: taoky <me@taoky.moe>
2024-03-28 12:09:59 +01:00
..
libnotify_notification.cc fix: don't do self-destroy in LibnotifyNotification::Dismiss() (#41708) 2024-03-28 12:09:59 +01:00
libnotify_notification.h fix: don't do self-destroy in LibnotifyNotification::Dismiss() (#41708) 2024-03-28 12:09:59 +01:00
notification_presenter_linux.cc
notification_presenter_linux.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00