codebytere

#49917: fix: crash after win.showAllTabs() new tab

Merged
Created: Feb 23, 2026, 2:12:07 PM
Merged: Feb 24, 2026, 3:09:09 PM
4 comments
Target: main

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

Release Notes

Notes: Fixed a macOS crash when creating a new tab from the tab overview.

Backports

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