Merge pull request #4314 from deepak1556/download_cancel_patch

fix crash when default download is canceled
This commit is contained in:
Cheng Zhao 2016-02-02 18:40:44 +08:00
commit f624800881
6 changed files with 97 additions and 26 deletions

View file

@ -60,7 +60,8 @@ The following events are available on instances of `Session`:
Emitted when Electron is about to download `item` in `webContents`.
Calling `event.preventDefault()` will cancel the download.
Calling `event.preventDefault()` will cancel the download and `item` will not be
available from next tick of the process.
```javascript
session.defaultSession.on('will-download', function(event, item, webContents) {