#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
40-x-y
MergedPR Number
#49934Merged At
Feb 25, 2026, 7:39:27 AM
Released In
v40.7.0Release Date
Mar 3, 2026, 10:03:33 AM
41-x-y
MergedPR Number
#49933Merged At
Feb 25, 2026, 10:54:27 AM
Released In
v41.0.0-beta.6Release Date
Feb 26, 2026, 7:31:25 AM
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