ipcRenderer: fix crash with multiple listeners to sync message
This commit is contained in:
parent
636570306a
commit
45b3bd3a22
2 changed files with 19 additions and 1 deletions
|
@ -200,6 +200,21 @@ describe('ipc module', function () {
|
|||
})
|
||||
w.loadURL('file://' + path.join(fixtures, 'api', 'send-sync-message.html'))
|
||||
})
|
||||
|
||||
it('does not crash when reply is sent by multiple listeners', function (done) {
|
||||
var w = new BrowserWindow({
|
||||
show: false
|
||||
})
|
||||
ipcMain.on('send-sync-message', function (event) {
|
||||
event.returnValue = null
|
||||
})
|
||||
ipcMain.on('send-sync-message', function (event) {
|
||||
event.returnValue = null
|
||||
w.destroy()
|
||||
done()
|
||||
})
|
||||
w.loadURL('file://' + path.join(fixtures, 'api', 'send-sync-message.html'))
|
||||
})
|
||||
})
|
||||
|
||||
describe('remote listeners', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue