gracefully handle the case in which a delegate command has been disposed before execution, fixes #3265

This commit is contained in:
Johannes Rieken
2016-04-21 13:55:05 +02:00
parent 255c7d5a96
commit 56b71bd9c1
5 changed files with 51 additions and 27 deletions

View File

@@ -23,6 +23,7 @@ import {ExtHostMessageService} from 'vs/workbench/api/node/extHostMessageService
import {ExtHostEditors} from 'vs/workbench/api/node/extHostEditors';
import {ExtHostLanguages} from 'vs/workbench/api/node/extHostLanguages';
import {ExtHostLanguageFeatures} from 'vs/workbench/api/node/extHostLanguageFeatures';
import * as ExtHostTypeConverters from 'vs/workbench/api/node/extHostTypeConverters';
import {registerApiCommands} from 'vs/workbench/api/node/extHostApiCommands';
import * as extHostTypes from 'vs/workbench/api/node/extHostTypes';
import Modes = require('vs/editor/common/modes');
@@ -148,6 +149,10 @@ export class ExtHostAPIImplementation {
const extHostStatusBar = new ExtHostStatusBar(this._threadService);
const extHostOutputService = new ExtHostOutputService(this._threadService);
// the converter might create delegate commands to avoid sending args
// around all the time
ExtHostTypeConverters.Command.initialize(extHostCommands);
// env namespace
let telemetryInfo: ITelemetryInfo;
this.env = Object.freeze({