Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
6c59d053
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,发现更多精彩内容 >>
提交
6c59d053
编写于
3月 20, 2019
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move mainThread[H,L], #70319
上级
f49b168f
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
70 addition
and
58 deletion
+70
-58
src/vs/workbench/api/browser/mainThreadHeapService.ts
src/vs/workbench/api/browser/mainThreadHeapService.ts
+25
-0
src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts
src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts
+1
-1
src/vs/workbench/api/electron-browser/extensionHost.contribution.ts
...kbench/api/electron-browser/extensionHost.contribution.ts
+2
-2
src/vs/workbench/services/heap/common/heap.ts
src/vs/workbench/services/heap/common/heap.ts
+33
-0
src/vs/workbench/services/heap/node/heap.ts
src/vs/workbench/services/heap/node/heap.ts
+1
-39
src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts
...ench/test/electron-browser/api/extHostApiCommands.test.ts
+3
-8
src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts
...test/electron-browser/api/extHostLanguageFeatures.test.ts
+3
-8
src/vs/workbench/workbench.main.ts
src/vs/workbench/workbench.main.ts
+1
-0
src/vs/workbench/workbench.nodeless.main.ts
src/vs/workbench/workbench.nodeless.main.ts
+1
-0
未找到文件。
src/vs/workbench/api/browser/mainThreadHeapService.ts
0 → 100644
浏览文件 @
6c59d053
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
ExtHostContext
,
IExtHostContext
}
from
'
../common/extHost.protocol
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
extHostCustomer
}
from
'
vs/workbench/api/common/extHostCustomers
'
;
import
{
IHeapService
}
from
'
vs/workbench/services/heap/common/heap
'
;
@
extHostCustomer
export
class
MainThreadHeapService
extends
Disposable
{
constructor
(
extHostContext
:
IExtHostContext
,
@
IHeapService
heapService
:
IHeapService
,
)
{
super
();
const
proxy
=
extHostContext
.
getProxy
(
ExtHostContext
.
ExtHostHeapService
);
this
.
_register
(
heapService
.
onGarbageCollection
((
ids
)
=>
{
// send to ext host
proxy
.
$onGarbageCollection
(
ids
);
}));
}
}
src/vs/workbench/api/
electron-
browser/mainThreadLanguageFeatures.ts
→
src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts
浏览文件 @
6c59d053
...
...
@@ -14,7 +14,6 @@ import { Range as EditorRange } from 'vs/editor/common/core/range';
import
{
ExtHostContext
,
MainThreadLanguageFeaturesShape
,
ExtHostLanguageFeaturesShape
,
MainContext
,
IExtHostContext
,
ISerializedLanguageConfiguration
,
ISerializedRegExp
,
ISerializedIndentationRule
,
ISerializedOnEnterRule
,
LocationDto
,
WorkspaceSymbolDto
,
CodeActionDto
,
reviveWorkspaceEditDto
,
ISerializedDocumentFilter
,
DefinitionLinkDto
,
ISerializedSignatureHelpProviderMetadata
,
CodeInsetDto
,
LinkDto
,
CallHierarchyDto
}
from
'
../common/extHost.protocol
'
;
import
{
LanguageConfigurationRegistry
}
from
'
vs/editor/common/modes/languageConfigurationRegistry
'
;
import
{
LanguageConfiguration
,
IndentationRule
,
OnEnterRule
}
from
'
vs/editor/common/modes/languageConfiguration
'
;
import
{
IHeapService
}
from
'
./mainThreadHeapService
'
;
import
{
IModeService
}
from
'
vs/editor/common/services/modeService
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/common/extHostCustomers
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
...
...
@@ -22,6 +21,7 @@ import { Selection } from 'vs/editor/common/core/selection';
import
*
as
codeInset
from
'
vs/workbench/contrib/codeinset/common/codeInset
'
;
import
{
ExtensionIdentifier
}
from
'
vs/platform/extensions/common/extensions
'
;
import
*
as
callh
from
'
vs/workbench/contrib/callHierarchy/common/callHierarchy
'
;
import
{
IHeapService
}
from
'
vs/workbench/services/heap/common/heap
'
;
@
extHostNamedCustomer
(
MainContext
.
MainThreadLanguageFeatures
)
export
class
MainThreadLanguageFeatures
implements
MainThreadLanguageFeaturesShape
{
...
...
src/vs/workbench/api/electron-browser/extensionHost.contribution.ts
浏览文件 @
6c59d053
...
...
@@ -29,7 +29,9 @@ import '../browser/mainThreadEditors';
import
'
../browser/mainThreadErrors
'
;
import
'
../browser/mainThreadFileSystem
'
;
import
'
../browser/mainThreadFileSystemEventService
'
;
import
'
../browser/mainThreadHeapService
'
;
import
'
../browser/mainThreadLanguages
'
;
import
'
../browser/mainThreadLanguageFeatures
'
;
import
'
../browser/mainThreadLogService
'
;
import
'
../browser/mainThreadMessageService
'
;
import
'
../browser/mainThreadOutputService
'
;
...
...
@@ -49,8 +51,6 @@ import '../browser/mainThreadWorkspace';
import
'
./mainThreadComments
'
;
import
'
./mainThreadConsole
'
;
import
'
./mainThreadExtensionService
'
;
import
'
./mainThreadHeapService
'
;
import
'
./mainThreadLanguageFeatures
'
;
import
'
./mainThreadTask
'
;
import
'
./mainThreadWebview
'
;
import
'
vs/workbench/api/node/apiCommands
'
;
...
...
src/vs/workbench/services/heap/common/heap.ts
0 → 100644
浏览文件 @
6c59d053
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
export
const
IHeapService
=
createDecorator
<
IHeapService
>
(
'
heapService
'
);
export
interface
ObjectIdentifier
{
$ident
?:
number
;
}
export
interface
IHeapService
{
_serviceBrand
:
any
;
readonly
onGarbageCollection
:
Event
<
number
[]
>
;
/**
* Track gc-collection for the given object
*/
trackObject
(
obj
:
ObjectIdentifier
|
undefined
):
void
;
}
export
class
NullHeapService
implements
IHeapService
{
_serviceBrand
:
any
;
onGarbageCollection
=
Event
.
None
;
trackObject
()
{
}
}
src/vs/workbench/
api/electron-browser/mainThreadHeapService
.ts
→
src/vs/workbench/
services/heap/node/heap
.ts
浏览文件 @
6c59d053
...
...
@@ -3,26 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
{
ExtHostContext
,
ObjectIdentifier
,
IExtHostContext
}
from
'
../common/extHost.protocol
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
registerSingleton
}
from
'
vs/platform/instantiation/common/extensions
'
;
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
extHostCustomer
}
from
'
vs/workbench/api/common/extHostCustomers
'
;
import
{
GCSignal
}
from
'
gc-signals
'
;
export
const
IHeapService
=
createDecorator
<
IHeapService
>
(
'
heapService
'
);
export
interface
IHeapService
{
_serviceBrand
:
any
;
readonly
onGarbageCollection
:
Event
<
number
[]
>
;
/**
* Track gc-collection for the given object
*/
trackObject
(
obj
:
ObjectIdentifier
|
undefined
):
void
;
}
import
{
IHeapService
,
ObjectIdentifier
}
from
'
vs/workbench/services/heap/common/heap
'
;
export
class
HeapService
implements
IHeapService
{
...
...
@@ -93,26 +77,4 @@ export class HeapService implements IHeapService {
}
}
@
extHostCustomer
export
class
MainThreadHeapService
{
private
readonly
_toDispose
:
IDisposable
;
constructor
(
extHostContext
:
IExtHostContext
,
@
IHeapService
heapService
:
IHeapService
,
)
{
const
proxy
=
extHostContext
.
getProxy
(
ExtHostContext
.
ExtHostHeapService
);
this
.
_toDispose
=
heapService
.
onGarbageCollection
((
ids
)
=>
{
// send to ext host
proxy
.
$onGarbageCollection
(
ids
);
});
}
public
dispose
():
void
{
this
.
_toDispose
.
dispose
();
}
}
registerSingleton
(
IHeapService
,
HeapService
,
true
);
src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts
浏览文件 @
6c59d053
...
...
@@ -15,8 +15,8 @@ import { IMarkerService } from 'vs/platform/markers/common/markers';
import
{
ICommandService
,
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
IModelService
}
from
'
vs/editor/common/services/modelService
'
;
import
{
ExtHostLanguageFeatures
}
from
'
vs/workbench/api/node/extHostLanguageFeatures
'
;
import
{
MainThreadLanguageFeatures
}
from
'
vs/workbench/api/
electron-
browser/mainThreadLanguageFeatures
'
;
import
{
IHeapService
}
from
'
vs/workbench/api/electron-browser/mainThreadHeapService
'
;
import
{
MainThreadLanguageFeatures
}
from
'
vs/workbench/api/browser/mainThreadLanguageFeatures
'
;
import
{
IHeapService
,
NullHeapService
}
from
'
vs/workbench/services/heap/common/heap
'
;
import
{
ExtHostApiCommands
}
from
'
vs/workbench/api/node/extHostApiCommands
'
;
import
{
ExtHostCommands
}
from
'
vs/workbench/api/node/extHostCommands
'
;
import
{
ExtHostHeapService
}
from
'
vs/workbench/api/node/extHostHeapService
'
;
...
...
@@ -67,12 +67,7 @@ suite('ExtHostLanguageFeatureCommands', function () {
{
let
instantiationService
=
new
TestInstantiationService
();
rpcProtocol
=
new
TestRPCProtocol
();
instantiationService
.
stub
(
IHeapService
,
{
_serviceBrand
:
undefined
,
trackObject
(
_obj
:
any
)
{
// nothing
}
});
instantiationService
.
stub
(
IHeapService
,
NullHeapService
);
instantiationService
.
stub
(
ICommandService
,
{
_serviceBrand
:
undefined
,
executeCommand
(
id
:
string
,
args
:
any
):
any
{
...
...
src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts
浏览文件 @
6c59d053
...
...
@@ -15,10 +15,10 @@ import { TestRPCProtocol } from './testRPCProtocol';
import
{
IMarkerService
}
from
'
vs/platform/markers/common/markers
'
;
import
{
MarkerService
}
from
'
vs/platform/markers/common/markerService
'
;
import
{
ExtHostLanguageFeatures
}
from
'
vs/workbench/api/node/extHostLanguageFeatures
'
;
import
{
MainThreadLanguageFeatures
}
from
'
vs/workbench/api/
electron-
browser/mainThreadLanguageFeatures
'
;
import
{
MainThreadLanguageFeatures
}
from
'
vs/workbench/api/browser/mainThreadLanguageFeatures
'
;
import
{
ExtHostCommands
}
from
'
vs/workbench/api/node/extHostCommands
'
;
import
{
MainThreadCommands
}
from
'
vs/workbench/api/browser/mainThreadCommands
'
;
import
{
IHeapService
}
from
'
vs/workbench/api/electron-browser/mainThreadHeapService
'
;
import
{
IHeapService
,
NullHeapService
}
from
'
vs/workbench/services/heap/common/heap
'
;
import
{
ExtHostDocuments
}
from
'
vs/workbench/api/node/extHostDocuments
'
;
import
{
ExtHostDocumentsAndEditors
}
from
'
vs/workbench/api/node/extHostDocumentsAndEditors
'
;
import
{
getDocumentSymbols
}
from
'
vs/editor/contrib/quickOpen/quickOpen
'
;
...
...
@@ -81,12 +81,7 @@ suite('ExtHostLanguageFeatures', function () {
{
let
instantiationService
=
new
TestInstantiationService
();
instantiationService
.
stub
(
IMarkerService
,
MarkerService
);
instantiationService
.
stub
(
IHeapService
,
{
_serviceBrand
:
undefined
,
trackObject
(
_obj
:
any
)
{
// nothing
}
});
instantiationService
.
stub
(
IHeapService
,
NullHeapService
);
inst
=
instantiationService
;
}
...
...
src/vs/workbench/workbench.main.ts
浏览文件 @
6c59d053
...
...
@@ -134,6 +134,7 @@ import 'vs/workbench/services/extensions/electron-browser/extensionManagementSer
import
'
vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl
'
;
import
'
vs/workbench/services/notification/common/notificationService
'
;
import
'
vs/workbench/services/remote/common/remoteEnvironmentService
'
;
import
'
vs/workbench/services/heap/node/heap
'
;
registerSingleton
(
IMenuService
,
MenuService
,
true
);
registerSingleton
(
IListService
,
ListService
,
true
);
...
...
src/vs/workbench/workbench.nodeless.main.ts
浏览文件 @
6c59d053
...
...
@@ -136,6 +136,7 @@ import 'vs/workbench/services/label/common/labelService';
// import 'vs/workbench/services/remote/electron-browser/remoteAgentServiceImpl';
import
'
vs/workbench/services/notification/common/notificationService
'
;
import
'
vs/workbench/services/remote/common/remoteEnvironmentService
'
;
// import 'vs/workbench/services/heap/node/heap';
registerSingleton
(
IMenuService
,
MenuService
,
true
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录