Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
0e0fbf98
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0e0fbf98
编写于
11月 28, 2018
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
don't write profile too early, apply pii massage
上级
701ccb5d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
6 deletion
+20
-6
src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts
...ts/extensions/electron-browser/runtimeExtensionsEditor.ts
+20
-6
未找到文件。
src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts
浏览文件 @
0e0fbf98
...
...
@@ -469,6 +469,7 @@ export class ReportExtensionIssueAction extends Action {
private
static
_label
=
nls
.
localize
(
'
reportExtensionIssue
'
,
"
Report Issue
"
);
private
readonly
_url
:
string
;
private
readonly
_task
:
()
=>
Promise
<
any
>
;
constructor
(
extension
:
{
description
:
IExtensionDescription
;
...
...
@@ -481,12 +482,16 @@ export class ReportExtensionIssueAction extends Action {
&&
extension
.
marketplaceInfo
.
type
===
LocalExtensionType
.
User
&&
Boolean
(
extension
.
description
.
repository
)
&&
Boolean
(
extension
.
description
.
repository
.
url
);
this
.
_url
=
ReportExtensionIssueAction
.
_generateNewIssueUrl
(
extension
);
const
{
url
,
task
}
=
ReportExtensionIssueAction
.
_generateNewIssueUrl
(
extension
);
this
.
_url
=
url
;
this
.
_task
=
task
;
}
run
():
Promise
<
any
>
{
async
run
():
Promise
<
void
>
{
if
(
this
.
_task
)
{
await
this
.
_task
();
}
window
.
open
(
this
.
_url
);
return
Promise
.
resolve
(
null
);
}
private
static
_generateNewIssueUrl
(
extension
:
{
...
...
@@ -494,7 +499,9 @@ export class ReportExtensionIssueAction extends Action {
marketplaceInfo
:
IExtension
;
status
:
IExtensionsStatus
;
unresponsiveProfile
?:
IExtensionHostProfile
}):
string
{
}):
{
url
:
string
,
task
?:
()
=>
Promise
<
any
>
}
{
let
task
:
()
=>
Promise
<
any
>
;
let
baseUrl
=
extension
.
marketplaceInfo
&&
extension
.
marketplaceInfo
.
type
===
LocalExtensionType
.
User
&&
extension
.
description
.
repository
?
extension
.
description
.
repository
.
url
:
undefined
;
if
(
!!
baseUrl
)
{
baseUrl
=
`
${
baseUrl
.
indexOf
(
'
.git
'
)
!==
-
1
?
baseUrl
.
substr
(
0
,
baseUrl
.
length
-
4
)
:
baseUrl
}
/issues/new/`
;
...
...
@@ -508,7 +515,11 @@ export class ReportExtensionIssueAction extends Action {
// unresponsive extension host caused
reason
=
'
Performance
'
;
let
path
=
join
(
os
.
homedir
(),
`
${
extension
.
description
.
id
}
-unresponsive.cpuprofile.txt`
);
writeFile
(
path
,
JSON
.
stringify
(
extension
.
unresponsiveProfile
.
data
)).
catch
(
onUnexpectedError
);
task
=
async
()
=>
{
const
profiler
=
await
import
(
'
v8-inspect-profiler
'
);
const
data
=
profiler
.
rewriteAbsolutePaths
({
profile
:
<
any
>
extension
.
unresponsiveProfile
.
data
},
'
pii_removed
'
);
writeFile
(
path
,
JSON
.
stringify
(
data
)).
catch
(
onUnexpectedError
);
};
message
=
`:warning: Make sure to **attach** this file from your *home*-directory:
\`
${
path
}
\`
:warning:`
;
}
else
{
...
...
@@ -528,7 +539,10 @@ export class ReportExtensionIssueAction extends Action {
- VSCode version:
\`
${
pkg
.
version
}
\`
\n\n
${
message
}
`
);
return
`
${
baseUrl
}${
queryStringPrefix
}
body=
${
body
}
`
;
return
{
url
:
`
${
baseUrl
}${
queryStringPrefix
}
body=
${
body
}
`
,
task
};
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录