提交 f402cb34 编写于 作者: J Joao Moreno

have window id for renderer and exthost processes

上级 9b3478b6
......@@ -76,6 +76,7 @@ export interface IInitData {
extensions: IExtensionDescription[];
configuration: IConfigurationInitData;
telemetryInfo: ITelemetryInfo;
windowId: number;
args: ParsedArgs;
execPath: string;
}
......
......@@ -73,12 +73,13 @@ function openWorkbench(configuration: IWindowConfiguration): TPromise<void> {
const mainServices = createMainProcessServices(mainProcessClient);
const environmentService = new EnvironmentService(configuration, configuration.execPath);
const logService = new SpdLogService('renderer', environmentService);
const logService = new SpdLogService(`renderer${currentWindowId}`, environmentService);
logService.info('openWorkbench', JSON.stringify(configuration));
// Since the configuration service is one of the core services that is used in so many places, we initialize it
// right before startup of the workbench shell to have its data ready for consumers
return createAndInitializeWorkspaceService(configuration, environmentService).then(workspaceService => {
const timerService = new TimerService((<any>window).MonacoEnvironment.timers as IInitData, workspaceService.getWorkbenchState() === WorkbenchState.EMPTY);
const storageService = createStorageService(workspaceService, environmentService);
......
......@@ -86,7 +86,8 @@ export class ExtensionHostMain {
const threadService = new ExtHostThreadService(rpcProtocol);
const extHostWorkspace = new ExtHostWorkspace(threadService, initData.workspace);
const environmentService = new EnvironmentService(initData.args, initData.execPath);
const logService = new SpdLogService('exthost', environmentService);
const logService = new SpdLogService(`exthost${initData.windowId}`, environmentService);
logService.info('main', JSON.stringify(initData));
this._extHostConfiguration = new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), extHostWorkspace, initData.configuration);
this._extensionService = new ExtHostExtensionService(initData, threadService, extHostWorkspace, this._extHostConfiguration, logService);
......
......@@ -365,7 +365,8 @@ export class ExtensionHostProcessWorker {
configuration: !this._environmentService.isBuilt || this._environmentService.isExtensionDevelopment ? { ...configurationData, configurationScopes: getScopes(this._configurationService.keys().default) } : configurationData,
telemetryInfo,
args: this._environmentService.args,
execPath: this._environmentService.execPath
execPath: this._environmentService.execPath,
windowId: this._windowService.getCurrentWindowId()
};
return r;
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册