#55579: refactor: protect task dialog HWND storage with raw_ptr
Merged
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
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