mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
wire-up dispose calls, #9384
This commit is contained in:
@@ -48,7 +48,11 @@ export class ExtHostCommands extends ExtHostCommandsShape {
|
||||
this._commands[id] = { callback, thisArg, description };
|
||||
this._proxy.$registerCommand(id);
|
||||
|
||||
return new extHostTypes.Disposable(() => delete this._commands[id]);
|
||||
return new extHostTypes.Disposable(() => {
|
||||
if (delete this._commands[id]) {
|
||||
this._proxy.$unregisterCommand(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
executeCommand<T>(id: string, ...args: any[]): Thenable<T> {
|
||||
|
||||
Reference in New Issue
Block a user