提交 4c787031 编写于 作者: S Sandeep Somavarapu

fix dead lock - wait for workspace initialization while starting exthost

上级 564b7120
......@@ -44,7 +44,7 @@ export class MainThreadWorkspace implements MainThreadWorkspaceShape {
@ILabelService private readonly _labelService: ILabelService
) {
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostWorkspace);
this._proxy.$initializeWorkspace(this.getWorkspaceData(this._contextService.getWorkspace()));
this._contextService.getCompleteWorkspace().then(workspace => this._proxy.$initializeWorkspace(this.getWorkspaceData(workspace)));
this._contextService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspace, this, this._toDispose);
this._contextService.onDidChangeWorkbenchState(this._onDidChangeWorkspace, this, this._toDispose);
}
......
......@@ -245,7 +245,6 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
private async _initialize(): Promise<void> {
try {
const configProvider = await this._extHostConfiguration.getConfigProvider();
await this._extHostWorkspace.waitForInitializeCall();
await initializeExtensionApi(this, this._extensionApiFactory, this._registry, configProvider);
// Do this when extension service exists, but extensions are not being activated yet.
await connectProxyResolver(this._extHostWorkspace, configProvider, this, this._extHostLogService, this._mainThreadTelemetryProxy);
......@@ -658,6 +657,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
this._started = true;
return this._barrier.wait()
.then(() => this._extHostWorkspace.waitForInitializeCall())
.then(() => this._handleEagerExtensions())
.then(() => this._handleExtensionTests())
.then(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册