ckerr

#55579: refactor: protect task dialog HWND storage with raw_ptr

Merged
Created: Nov 3, 2026, 11:56:24 AM
Merged: Nov 3, 2026, 1:26:14 PM
2 comments
Target: main

Description of Change

Replace TaskDialogCallbackData::target with raw_ptr<HWND> and remove its misleading exclusion comment. The pointer refers to a heap-allocated HWND slot owned by the dialogs map, not to the native Windows window itself, so this is an ordinary borrowed pointer eligible for raw_ptr protection.

The existing cross-thread locking, slot ownership, button handling, and cancellation behavior are unchanged.

Validation

  • Targeted C++ lint and formatting checks passed.
  • The actual callback-data declaration, using Chromium's Windows HWND typedef and raw_ptr implementation, compiled with the configured Linux Chromium compiler flags. This also checked raw_ptr type support, assignment, callback extraction, and writes through the HWND slot.
  • A native Windows build and dialog runtime tests remain to be run in Windows CI; this checkout is Linux-only.

Release Notes

Notes: none

Backports

46-x-y
Merged
PR Number
#55581
Merged At
Nov 3, 2026, 2:32:33 PM
Released In
Not yet
Release Date
Not yet

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