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 clear until render view is deleted for process id #8110

merged 3 commits into from Dec 2, 2016


None yet
1 participant

kevinsawicki commented Dec 1, 2016

When a webContents is navigated or reloaded, the remote objects it was referencing are cleared from the objects registry via a render-view-deleted event listener.

Previously this was registered using a .once but it looks like render views are deleted asynchronously so sometimes the new render view would be created and the listener registered before the previous delete event fired. This would cause both to get deleted when the old one was eventually deleted since they were both listening and there was no process id checks done for the deleted render view.

This pull request switches to using a .on listener and waiting for the deleted render view process id to match the process id being listened to which ensures the registry is only cleared when the proper render view has been deleted.

Refs #7351
Refs #6857

@kevinsawicki kevinsawicki merged commit c27633d into master Dec 2, 2016

8 of 9 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
continuous-integration/appveyor/pr AppVeyor build succeeded
electron-linux-arm Build #4844570 succeeded in 62s
electron-linux-ia32 Build #4844571 succeeded in 61s
electron-linux-x64 Build #4844572 succeeded in 127s
electron-mas-x64 Build #2978 succeeded in 8 min 13 sec
electron-osx-x64 Build #2990 succeeded in 8 min 25 sec
electron-win-ia32 Build #2036 succeeded in 10 min
electron-win-x64 Build #2013 succeeded in 11 min

@kevinsawicki kevinsawicki deleted the track-render-view-by-process-id branch Dec 2, 2016

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