Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d089fe1de471767c17fafee2ac4053bb7615f96e
https://github.com/WebKit/WebKit/commit/d089fe1de471767c17fafee2ac4053bb7615f96e
Author: David Kilzer <[email protected]>
Date: 2026-05-09 (Sat, 09 May 2026)
Changed paths:
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
Log Message:
-----------
WKRevealItemPresenter crash under -[WKRevealItemPresenter showContextMenu]
<https://bugs.webkit.org/show_bug.cgi?id=308911>
<rdar://167973708>
Reviewed by Wenson Hsieh.
A crash occurs in `-[WKRevealItemPresenter showContextMenu]` because
the presenter is held by a single strong reference `m_revealItemPresenter`
in `WebViewImpl`. During the modal popup, this reference may be cleared by
a new data detection click arriving via IPC, which overwrites
`m_revealItemPresenter` with a newly allocated presenter, releasing the old one.
Use `protect(m_revealItemPresenter)` to retain the presenter for the duration
of the `showContextMenu` call.
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::handleClickForDataDetectionResult):
Originally-landed-as: 305413.386@safari-7624-branch (e6b1d4afc22d).
rdar://176067277
Canonical link: https://commits.webkit.org/312956@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications