#49917: fix: crash after win.showAllTabs() new tab
Merged
Description of Change
Closes #49819.
Round 2.
Fixes a macOS crash when creating a new tab from the tab overview (new-window-for-tab) on newer AppKit builds.
The crash happens in private visual tab picker animation paths where AppKit can build constraints from invalid/nil anchors. This change swizzles NSVisualTabPickerGridView’s startGridAnimation:completionHandler: and immediately runs the completion handler, avoiding the crash animation path while preserving behavior. Alternative possible approach was to swallow the exception, but i think this is a more targeted approach.
cc @nmggithub
Checklist
- PR description included
- I have built and tested this PR
-
npm testpasses - PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: Fixed a macOS crash when creating a new tab from the tab overview.
Backports
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron