Skip to content

createStandaloneErrorDialog leaks the BrowserWindow it creates by default #19535

Open

Description

@kevinushey

When no window is passed, createStandaloneErrorDialog (src/node/desktop/src/main/utils.ts) creates a BrowserWindow({ width: 0, height: 0 }) and never closes it, because the default shouldCloseWindow is false. The non-fatal startup warnings (state folders, reset desktop options) leave that hidden window open until closeAllSatellites runs.

The function should close the window it created itself, and the doc comment's "if you pass a custom window, you must pass shouldCloseWindow = true" has the ownership backwards.

Noted by @gtritchie in the review of #19501.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions