Skip to content

Speculative fix for StabilityTracer: Safari at com.apple.AppKit: -[NSDraggingItem setDraggingFrame:]. - #63292

Closed
megangardner wants to merge 1 commit into
WebKit:mainfrom
megangardner:eng/Speculative-fix-for-StabilityTracer-Safari-at-com-apple-AppKit-NSDraggingItem-setDraggingFrame
Closed

megangardner wants to merge 1 commit into
WebKit:mainfrom
megangardner:eng/Speculative-fix-for-StabilityTracer-Safari-at-com-apple-AppKit-NSDraggingItem-setDraggingFrame

Conversation

@megangardner

@megangardner megangardner commented Apr 22, 2026 •

Copy link
Copy Markdown
Contributor

84880bf

Speculative fix for StabilityTracer: Safari at com.apple.AppKit:  -[NSDraggingItem setDraggingFrame:].
https://bugs.webkit.org/show_bug.cgi?id=312957
rdar://174904952

Reviewed by NOBODY (OOPS!).

Speculative fix for crash resulting from the drag image
having no size. We should try to keep the image from ever
getting to the zero size, but if it does, we should bail
before we give AppKit the chance to crash the app.

* Source/WebCore/platform/cocoa/DragImageCocoa.mm:
(WebCore::scaleDragImage):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::startDrag):

84880bf

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ⏳ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

…DraggingItem setDraggingFrame:].

https://bugs.webkit.org/show_bug.cgi?id=312957
rdar://174904952

Reviewed by NOBODY (OOPS!).

Speculative fix for crash resulting from the drag image
having no size. We should try to keep the image from ever
getting to the zero size, but if it does, we should bail
before we give AppKit the chance to crash the app.

* Source/WebCore/platform/cocoa/DragImageCocoa.mm:
(WebCore::scaleDragImage):
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::startDrag):
@megangardner
megangardner requested a review from cdumez as a code owner April 22, 2026 04:00
@megangardner megangardner self-assigned this Apr 22, 2026
@megangardner megangardner added the WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore). label Apr 22, 2026
webkit-commit-queue pushed a commit to megangardner/WebKit that referenced this pull request Apr 25, 2026
https://bugs.webkit.org/show_bug.cgi?id=313272
rdar://175548535

Reviewed by Abrar Rahman Protyasha.

When investigating rdar://174985681 I found that there
was a crash when trying to drag the captcha slider on tiktok.
This lead me to rdar://174904952 which I attempted to fix in
WebKit#63292 But didn't know that
it had already been fixed and tested in https://commits.webkit.org/310831@main

I am added exception blocking on top of that fix as this is
standard practice when interfacing with other Obj-C APIs, and
without it we would crash the entire Safari process.

* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::startDrag):

Canonical link: https://commits.webkit.org/312013@main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebKit Misc. For miscellaneous bugs in the WebKit framework (and not JavaScriptCore or WebCore).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants