electron/shell
trop[bot] 43bb93908c
fix: correct utility process exit code on Windows (#50386)
* fix: correct utility process exit code on Windows

On Windows, process exit codes are 32-bit unsigned integers (DWORD).
When passed from Chromium to Electron as a signed int and then
implicitly converted to uint64_t, values with the high bit set
(e.g., NTSTATUS codes) undergo sign extension, producing incorrect
values.

Cast the exit code to uint32_t before widening to uint64_t to
prevent sign extension and preserve the original Windows exit code.

Fixes #49455

Co-authored-by: João Silva <joaomrsilva@tecnico.ulisboa.pt>

* fix: narrow HandleTermination and Shutdown to uint32_t, add tests

Co-authored-by: João Silva <joaomrsilva@tecnico.ulisboa.pt>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: João Silva <joaomrsilva@tecnico.ulisboa.pt>
2026-03-19 18:48:27 -07:00
..
app chore: bump chromium to 146.0.7666.0 (41-x-y) (#49543) 2026-02-17 16:19:16 -05:00
browser fix: correct utility process exit code on Windows (#50386) 2026-03-19 18:48:27 -07:00
common fix: read nodeIntegrationInWorker from per-frame WebPreferences (#50134) 2026-03-09 23:26:10 +00:00
renderer fix: read nodeIntegrationInWorker from per-frame WebPreferences (#50134) 2026-03-09 23:26:10 +00:00
services/node feat: enable WASM trap handlers in all Node.js processes (#49839) 2026-02-18 13:22:36 -05:00
utility fix: broken OOP window.print() on macOS/Linux (#45214) 2025-01-20 10:23:44 +01:00