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
merged 5 commits into from Apr 11, 2017

Conversation

Projects
None yet
1 participant
@kevinsawicki
Contributor

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
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
electron-linux-arm Build #6194383 succeeded in 72s
Details
electron-linux-ia32 Build #6194384 succeeded in 67s
Details
electron-linux-x64 Build #6194385 succeeded in 153s
Details
electron-mas-x64 Build #3880 succeeded in 8 min 37 sec
Details
electron-osx-x64 Build #3872 succeeded in 9 min 11 sec
Details
electron-win-ia32 Build #2862 succeeded in 8 min 22 sec
Details
electron-win-x64 Build #2835 succeeded in 8 min 21 sec
Details

@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