Ignore already closed windows #7432

Merged
merged 1 commit into from Oct 3, 2016

Projects

None yet

2 participants

@kevinsawicki
Contributor

When an embedder's render view is deleted, the guest is destroyed, https://github.com/electron/electron/blob/ff6a8fac2a370059aaf54dc027203bfedc08c630/lib/browser/guest-window-manager.js#L108-L109

This is causing issues on Windows when WindowList::CloseAllWindows() is called since when the first window is closed, the second window will also be closed causing a crash when NativeWindow::Close() is called a second time and a crash occurs when checking the accelerated widget in IsClosable().

This pull request adds a check for IsClosed() before calling Close() to guard against this.

Not sure if this check is better to put in NativeWindowViews::Close()instead.

Closes #7074

@kevinsawicki kevinsawicki Ignore already closed windows
140651c
@zcbenz
Contributor
zcbenz commented Oct 3, 2016

👍

@zcbenz zcbenz merged commit ec34bfd into master Oct 3, 2016

7 of 8 checks passed

electron-win-ia32 Build #1592 failed in 8 min 1 sec
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
electron-linux-arm Build #4300169 succeeded in 60s
Details
electron-linux-ia32 Build #4300170 succeeded in 53s
Details
electron-linux-x64 Build #4300171 succeeded in 109s
Details
electron-mas-x64 Build #2498 succeeded in 8 min 6 sec
Details
electron-osx-x64 Build #2504 succeeded in 9 min 20 sec
Details
electron-win-x64 Build #1568 succeeded in 8 min 3 sec
Details
@zcbenz zcbenz deleted the check-if-window-closed branch Oct 3, 2016
@aluxian-huginn aluxian-huginn referenced this pull request in Aluxian/Messenger-for-Desktop Oct 6, 2016
Closed

Update dependency: electron v1.4.3 #723

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