Fix stack overflow crash in FileDropOverlayView
Merged
LA
9mo ago+8+8+0123456789-0-0-0123456789
Summary
- Fixes EXC_BAD_ACCESS (stack overflow) crash in production (Sentry #7273822119)
FileDropOverlayView.forwardEvent()uses a hide-send-unhide pattern to forward mouse events through to views below, butNSWindow.sendEvent()can re-deliver the event via gesture recognizer routing which doesn't respectisHidden, causing infinite recursion- Adds a re-entrancy guard (
isForwardingflag) to break the cycle
Test plan
- Verify file drag-and-drop from Finder still works on terminal views
- Verify normal mouse clicks/scrolls pass through the overlay correctly
- Confirm no crash on repeated rapid clicking with stale drag pasteboard