提交 cf3dbf96 编写于 作者: J Johannes Rieken

more strict null issues

上级 d36763c7
......@@ -109,6 +109,10 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont
}
}
if (!top) {
return;
}
this._extensionService.getExtension(top.id).then(async extension => {
if (!extension) {
return;
......@@ -117,7 +121,7 @@ export class ExtensionsAutoProfiler extends Disposable implements IWorkbenchCont
const path = join(tmpdir(), `exthost-${Math.random().toString(16).slice(2, 8)}.cpuprofile`);
await writeFile(path, JSON.stringify(profile.data));
this._logService.warn(`UNRESPONSIVE extension host, '${top ? top.id : 'unknown'}' took ${top ? top.percentage : 'unknown'}% of ${duration / 1e3}ms, saved PROFILE here: '${path}'`, data);
this._logService.warn(`UNRESPONSIVE extension host, 'top.id' took ${top!.percentage}% of ${duration / 1e3}ms, saved PROFILE here: '${path}'`, data);
/* __GDPR__
"exthostunresponsive" : {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册