Cleanup wrapper function when app has done quitting

The app may still do something when quitting, we need to make sure the
wrapper function is still there at that time.
This commit is contained in:
Cheng Zhao 2015-11-04 16:54:36 +08:00
parent 441cc3e57e
commit 75f49477ca
5 changed files with 31 additions and 24 deletions

View file

@ -59,10 +59,7 @@ app.on 'activate', (event, hasVisibleWindows) -> @emit 'activate-with-no-open-wi
# Wrappers for native classes.
sessionBindings._setWrapSession wrapSession
process.once 'exit', sessionBindings._clearWrapSession
downloadItemBindings._setWrapDownloadItem wrapDownloadItem
process.once 'exit', downloadItemBindings._clearWrapDownloadItem
# Only one App object pemitted.
module.exports = app