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

Don't load URL if web contents is destroyed #8254

Merged
merged 2 commits into from Dec 28, 2016

Conversation

Projects
None yet
1 participant
@kevinsawicki
Contributor

kevinsawicki commented Dec 21, 2016

Closing a window from a will-navigate listener but not calling event.preventDefault() would crash the app because the URL would continue to load in a destroyed web contents.

This adds a check to see if the web contents was marked as destroyed after the will-navigate event is emitted.

Closes #4374

@kevinsawicki kevinsawicki merged commit bc39964 into master Dec 28, 2016

0 of 6 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 #5056209 started
Details
electron-linux-ia32 Build #5056210 queued
Details
electron-linux-x64 Build #5056211 queued
Details
electron-osx-x64 Build #3098 in progress...
Details

@kevinsawicki kevinsawicki deleted the webcontents-will-navigate-crash branch Dec 28, 2016

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