fix NPE when running "Startup Performance" command

This commit is contained in:
Benjamin Pasero 2015-11-19 09:27:46 +01:00
parent 6a6d2ed21f
commit c703e36c0b

View File

@ -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[] {