codebytere

#54365: fix: don't crash creating a framed window on Wayland without a Linux UI theme

Merged
Created: Sep 25, 2026, 5:45:55 AM
Merged: Sep 25, 2026, 11:15:41 AM
3 comments
Target: main

Description of Change

Fixes #49244.

After this change a framed BrowserWindow on Wayland opens without a title bar instead of crashing the process when no Linux UI toolkit is available (GTK failing under snap confinement, minimal VMs, missing XDG directories).

The client-side frame path dereferenced ui::LinuxUiTheme::GetForProfile() without a null check, and it is null in exactly those environments. Chrome checks the same call and falls back to its own frame.

CreateFrameView now uses the toolkit frame only when a theme exists and otherwise falls back to the self-drawn frame already used for frameless windows, logging a warning. Built and run on Linux; the no-toolkit branch was verified by reading, not on a confined snap.

Checklist

Release Notes

Notes: Fixed a crash when creating a framed window on Wayland in environments where GTK could not initialize.

Backports

44-x-y
Pending
Waiting for a manual backport
45-x-y
In-flight
PR Number
#54399
Waiting to be merged

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