Bug 258313

Summary: WebPageProxy::setToolTip accesses a null PageClient
Product: WebKit Reporter: Abrar Rahman Protyasha <a_protyasha>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: a_protyasha, webkit-bug-importer
Priority: P1 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Abrar Rahman Protyasha 2023-06-20 12:04:21 PDT
In 264455@main, we introduced `WebPageProxy::dispatchMouseDidMoveOverElementAsynchronously`, which asks to perform `WebPageProxy::mouseDidMoveOverElement` at a future time. It turns out there's a null access on `m_pageClient` when we then call into `WebPageProxy::setToolTip`, which happens because we hold a `WeakPtr<PageClient>` instance to the `PageClient` object, meaning there are no guarantees on the PageClient instance's lifetime.

We should make sure this null deference does not happen.
Comment 1 Abrar Rahman Protyasha 2023-06-20 12:04:26 PDT
rdar://110501313
Comment 2 Abrar Rahman Protyasha 2023-06-20 12:08:18 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15113
Comment 3 EWS 2023-06-23 03:28:58 PDT
Committed 265456@main (46b03afa5a23): <https://commits.webkit.org/265456@main>

Reviewed commits have been landed. Closing PR #15113 and removing active labels.