electron/shell/browser/notifications
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
..
linux fix: don't do self-destroy in LibnotifyNotification::Dismiss() (#41708) 2024-03-28 12:09:59 +01:00
mac chore: bump chromium to 122.0.6236.2 (main) (#40871) 2024-01-11 19:33:40 +13:00
win refactor: remove banned std::to_string() calls (#41087) 2024-01-24 16:43:31 -06:00
notification.cc fix: Windows Toast notification dismissal from Action Center (#40197) 2023-10-17 19:33:00 -04:00
notification.h fix: Windows Toast notification dismissal from Action Center (#40197) 2023-10-17 19:33:00 -04:00
notification_delegate.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
notification_presenter.cc fix: remove same-tag notifications before showing new ones (#24302) 2020-07-02 23:04:32 -07:00
notification_presenter.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
platform_notification_service.cc chore: bump chromium to 119.0.6043.0 (main) (#40045) 2023-10-02 18:01:07 -04:00
platform_notification_service.h chore: bump chromium to 119.0.6043.0 (main) (#40045) 2023-10-02 18:01:07 -04:00