Skip to content

Avoid a startup panic if a just-created window is no longer in the registry #317

Description

@PathGao

The startup setup closure builds a Tauri window successfully, then immediately looks it up twice by label with app.get_webview_window(label).unwrap(). The newly returned window handle already supplies the same operations. If the registry changes during startup/teardown, the lookup can turn a recoverable lifecycle race into a process panic.

Use the handle returned by WebviewWindowBuilder::build() for theme, file delivery, focus, installer sizing, and centering. Add a regression test that rejects registry lookup unwraps in that setup path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions