fix: heap-use-after-free in tray.popUpContextMenu (#22842)

This commit is contained in:
Jeremy Apthorp 2020-03-26 18:30:21 -07:00 committed by GitHub
parent 8ff7a1160a
commit ac501e8194
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -73,6 +73,13 @@ describe('tray module', () => {
});
tray.popUpContextMenu();
});
it('can be called with a menu', () => {
const menu = Menu.buildFromTemplate([{ label: 'Test' }]);
expect(() => {
tray.popUpContextMenu(menu);
}).to.not.throw();
});
});
describe('tray.closeContextMenu()', () => {