fix NPE when running "Startup Performance" command

This commit is contained in:
Benjamin Pasero 2015-11-19 09:27:46 +01:00
Родитель 6a6d2ed21f
Коммит c703e36c0b
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -216,8 +216,15 @@ export class ShowStartupPerformance extends Action {
public static ID = 'workbench.action.appPerf';
public static LABEL = nls.localize('appPerf', "Startup Performance");
constructor(id: string, label: string, @IWindowService private windowService: IWindowService) {
constructor(
id: string,
label: string,
@IWindowService private windowService: IWindowService,
@IWorkspaceContextService private contextService: IWorkspaceContextService
) {
super(id, label);
this.enabled = contextService.getConfiguration().env.enablePerformance;
}
private _analyzeLoaderTimes(): any[] {