New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix app.exit() not closing all windows #9133

merged 5 commits into from Apr 11, 2017


None yet
1 participant

kevinsawicki commented Apr 6, 2017

Previously app.exit would iterate over all windows and destroy them. This failed when more than two windows existed because an iterator was being used on a vector that was having elements erased on it at the same time and so some windows were getting destroyed multiple times and other not destroyed at all.

This pull request switches WindowList to no longer be an iterable but instead return a vector of window pointers that callers can iterate over directly. Also adds a DestroyAllWindows helper similar to CloseAllWindows.

Closes #8915

@kevinsawicki kevinsawicki requested a review from zcbenz Apr 6, 2017

@kevinsawicki kevinsawicki merged commit 964b210 into master Apr 11, 2017

7 of 9 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
continuous-integration/travis-ci/pr The Travis CI build is in progress
electron-linux-arm Build #6194383 succeeded in 72s
electron-linux-ia32 Build #6194384 succeeded in 67s
electron-linux-x64 Build #6194385 succeeded in 153s
electron-mas-x64 Build #3880 succeeded in 8 min 37 sec
electron-osx-x64 Build #3872 succeeded in 9 min 11 sec
electron-win-ia32 Build #2862 succeeded in 8 min 22 sec
electron-win-x64 Build #2835 succeeded in 8 min 21 sec

@kevinsawicki kevinsawicki deleted the app-exit-failure branch Apr 11, 2017

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