Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1682be99490a2f051957f351a9d44782b4c579f8
      
https://github.com/WebKit/WebKit/commit/1682be99490a2f051957f351a9d44782b4c579f8
  Author: David Kilzer <[email protected]>
  Date:   2026-06-01 (Mon, 01 Jun 2026)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/mac/WebPageProxyMac.mm

  Log Message:
  -----------
  WebPageProxy crash in dispatchSetObscuredContentInsets() and 
clearTextIndicatorWithAnimation()
<https://bugs.webkit.org/show_bug.cgi?id=309108>
<rdar://167427221>

Reviewed by Anne van Kesteren.

Crashes occur when a `WebPageProxy` object is destroyed when a `WeakPtr`
is used to make a method call since it doesn't keep the object alive.

Promote unsafe `WeakPtr<WebPageProxy>` usage to `RefPtr<WebPageProxy` to
ensure the object stays alive for the duration of the method call.  Also
promote `WeakPtr<WebProcessProxy>` in completion callbacks where the
process object could be destroyed during sandbox extension processing.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadSimulatedRequest):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::contextMenuItemSelected):
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::didPerformDictionaryLookup):
(WebKit::WebPageProxy::scheduleSetObscuredContentInsetsDispatch):

Originally-landed-as: 305413.397@rapid/safari-7624.2.5.110-branch 
(79f65b10f8d8). rdar://176067210
Canonical link: https://commits.webkit.org/314290@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to