Skip to content

fix: Crash for Notification close - #51656

Merged
ckerr merged 1 commit into
41-x-yfrom
trop/41-x-y-bp-fix-crash-for-notification-close-1778879847584
May 15, 2026
Merged

ckerr merged 1 commit into
41-x-yfrom
trop/41-x-y-bp-fix-crash-for-notification-close-1778879847584

Conversation

@trop

@trop trop Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Backport of #51597

See that PR for details.

Notes: fix crash for Notification close

On the macOS platform, calling the `close` function again in the
`close` event of a Notification will cause a crash. The specific
reason is as follows: When the `close` function of a Notification
is called, the `dismiss` logic dispatches a "close" event. If the
`close` function is called again in the `close` event, it will
reset |notification_|, causing the weakptr to become
invalid. The first `close` function will continue to use this
invalid weakptr directly, thus triggering a crash.

Co-authored-by: Jinli Wu <[email protected]>
@trop trop Bot mentioned this pull request May 15, 2026
6 of 7 tasks
@trop trop Bot added 41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels May 15, 2026
@ckerr
ckerr merged commit b79810e into 41-x-y May 15, 2026
73 checks passed
@release-clerk

release-clerk Bot commented May 15, 2026

Copy link
Copy Markdown

Release Notes Persisted

fix crash for Notification close

@ckerr
ckerr deleted the trop/41-x-y-bp-fix-crash-for-notification-close-1778879847584 branch May 15, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

41-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.

1 participant