Merge from vscode 12cb89c82e88e035f4ab630f1b9fcebac338dc03 (#5125)

This commit is contained in:
Alan Ren
2019-04-19 10:26:20 -07:00
committed by GitHub
parent f248260584
commit 0e168e36fc
17 changed files with 111 additions and 49 deletions

View File

@@ -16,6 +16,9 @@ export function registerContextMenuListener(): void {
y: options ? options.y : undefined,
positioningItem: options ? options.positioningItem : undefined,
callback: () => {
// Workaround for https://github.com/Microsoft/vscode/issues/72447
// It turns out that the menu gets GC'ed if not referenced anymore
// As such we drag it into this scope so that it is not being GC'ed
if (menu) {
event.sender.send(CONTEXT_MENU_CLOSE_CHANNEL, contextMenuId);
}