pulsar/spec/integration
Antonio Scandurra 0f6eadcfce Wait for windows' state to be saved before closing the app or any window
Previously, we used to save the window's state in the renderer process
`beforeunload` event handler: because of the synchronous nature of event
handlers and the asynchronous design of IndexedDB, this could
potentially not save anything if windows close fast enough to prevent
IndexedDB from committing the pending transaction containing the state.
(Ref.: https://mzl.la/2bXCXDn)

With this commit, we will intercept the `before-quit` events on
`electron.app` and the `close` event on `BrowserWindow` (which will fire
respectively before quitting the application and before closing a
window), and prevent them from performing the default action. We will
then ask each renderer process to save its state and, finally, close the
window and/or the app.
2016-09-07 13:03:33 +02:00
..
helpers Wait for windows' state to be saved before closing the app or any window 2016-09-07 13:03:33 +02:00
smoke-spec.coffee Disable telemetry on AtomApplication tests and smoke-spec.coffee 2016-08-26 15:13:37 +02:00