Fixes #14500: wait for extension points

* Use the extension descriptions available in the UI thread
* Don't wait for handling extension points until extension host is running
* Create the extension host process only after extension points have been handled
* Send the initial configuration as part of the initData to the extension host
This commit is contained in:
Alex Dima
2016-10-26 22:02:47 +02:00
parent d801542057
commit 6dd7a04bbd
11 changed files with 39 additions and 52 deletions

View File

@@ -55,7 +55,7 @@ export class ExtensionHostMain {
this._extensionService = new ExtHostExtensionService(initData.extensions, threadService, telemetryService, { _serviceBrand: 'optionalArgs', workspaceStoragePath });
// Create the ext host API
const factory = createApiFactory(threadService, this._extensionService, this._contextService, telemetryService);
const factory = createApiFactory(initData.configuration, threadService, this._extensionService, this._contextService, telemetryService);
defineAPI(factory, this._extensionService);
}
@@ -107,7 +107,7 @@ export class ExtensionHostMain {
}
public start(): TPromise<void> {
return this.registerExtensions();
return this.handleEagerExtensions().then(() => this.handleExtensionTests());
}
public terminate(): void {
@@ -142,11 +142,6 @@ export class ExtensionHostMain {
}, 1000);
}
private registerExtensions(): TPromise<void> {
this._extensionService.registrationDone();
return this.handleEagerExtensions().then(() => this.handleExtensionTests());
}
// Handle "eager" activation extensions
private handleEagerExtensions(): TPromise<void> {
this._extensionService.activateByEvent('*').then(null, (err) => {