Disallow importing workbench/api in workbench/services (fixes #141003)

This commit is contained in:
Alex Dima
2022-02-01 00:00:25 +01:00
parent d6eb7e40e5
commit 71a20bb216
4 changed files with 11 additions and 6 deletions

View File

@@ -44,10 +44,13 @@ export class MainThreadExtensionService implements MainThreadExtensionServiceSha
@IWorkbenchEnvironmentService protected readonly _environmentService: IWorkbenchEnvironmentService,
) {
this._extensionHostKind = extHostContext.extensionHostKind;
this._internalExtensionService = (<IInternalExtHostContext>extHostContext).internalExtensionService;
(<IInternalExtHostContext>extHostContext)._setExtensionHostProxy(
const internalExtHostContext = (<IInternalExtHostContext>extHostContext);
this._internalExtensionService = internalExtHostContext.internalExtensionService;
internalExtHostContext._setExtensionHostProxy(
new ExtensionHostProxy(extHostContext.getProxy(ExtHostContext.ExtHostExtensionService))
);
internalExtHostContext._setAllMainProxyIdentifiers(Object.keys(MainContext).map((key) => (<any>MainContext)[key]));
}
public dispose(): void {